diff --git a/db/constraints.sql b/db/constraints.sql index 39da0c66f3..938067ef29 100644 --- a/db/constraints.sql +++ b/db/constraints.sql @@ -13,10 +13,13 @@ alter table user add unique(email_addr), add unique(authenticator), add index ind_tid (teamid), + add index user_tot (total_credit), add index user_avg (expavg_credit); alter table team - add unique(name); + add unique(name), + add index team_avg (expavg_credit), + add index team_tot (total_credit); alter table workunit add unique(name), @@ -32,4 +35,5 @@ alter table result add index res_filedel (file_delete_state); alter table host - add index host_avg (expavg_credit); + add index host_avg (expavg_credit), + add index host_tot (total_credit);