2002-04-30 22:22:54 +00:00
|
|
|
|
|
|
|
alter table platform
|
|
|
|
add unique(name);
|
|
|
|
|
|
|
|
alter table app
|
|
|
|
add unique(name);
|
|
|
|
|
|
|
|
alter table app_version
|
|
|
|
add unique(appid, platformid, version_num);
|
|
|
|
|
|
|
|
alter table user
|
2003-01-03 22:17:40 +00:00
|
|
|
add unique(email_addr),
|
|
|
|
add unique(authenticator),
|
|
|
|
add index ind_tid (teamid),
|
2004-06-16 19:10:24 +00:00
|
|
|
add index user_name(name),
|
2003-01-31 07:19:20 +00:00
|
|
|
add index user_tot (total_credit desc),
|
2003-12-02 22:04:26 +00:00
|
|
|
-- db_dump.C
|
2003-11-28 06:23:58 +00:00
|
|
|
add index user_avg (expavg_credit desc);
|
2003-12-02 22:04:26 +00:00
|
|
|
-- db_dump.C
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2002-07-11 20:35:05 +00:00
|
|
|
alter table team
|
2003-01-31 00:04:51 +00:00
|
|
|
add unique(name),
|
2003-01-31 07:19:20 +00:00
|
|
|
add index team_avg (expavg_credit desc),
|
2003-12-02 22:04:26 +00:00
|
|
|
-- db_dump.C
|
2003-11-28 06:23:58 +00:00
|
|
|
add index team_tot (total_credit desc);
|
2003-12-02 22:04:26 +00:00
|
|
|
-- db_dump.C
|
2002-07-11 20:35:05 +00:00
|
|
|
|
2002-04-30 22:22:54 +00:00
|
|
|
alter table workunit
|
2003-01-03 22:17:40 +00:00
|
|
|
add unique(name),
|
2003-12-02 22:04:26 +00:00
|
|
|
-- not currently used but good invariant
|
2003-01-03 22:17:40 +00:00
|
|
|
add index wu_val (appid, need_validate),
|
2003-12-02 22:04:26 +00:00
|
|
|
-- validator
|
2003-08-15 20:35:44 +00:00
|
|
|
add index wu_timeout (transition_time),
|
2003-12-02 22:04:26 +00:00
|
|
|
-- transitioner
|
2003-01-03 22:17:40 +00:00
|
|
|
add index wu_filedel (file_delete_state),
|
2003-12-02 22:04:26 +00:00
|
|
|
-- file_deleter
|
2003-01-03 22:17:40 +00:00
|
|
|
add index wu_assim (appid, assimilate_state);
|
2003-12-02 22:04:26 +00:00
|
|
|
-- assimilator
|
2002-04-30 22:22:54 +00:00
|
|
|
|
|
|
|
alter table result
|
2003-01-03 22:17:40 +00:00
|
|
|
add unique(name),
|
2003-12-02 22:04:26 +00:00
|
|
|
-- the scheduler looks up results by name
|
|
|
|
|
2003-12-31 23:09:21 +00:00
|
|
|
add index res_wuid (workunitid),
|
|
|
|
-- transitioner
|
|
|
|
-- NOTE res_wu_user may suffice, could try dropping this one
|
2003-12-02 22:04:26 +00:00
|
|
|
|
2004-07-08 19:20:19 +00:00
|
|
|
add index ind_res_st (server_state),
|
|
|
|
-- feeder
|
2003-12-02 22:04:26 +00:00
|
|
|
|
|
|
|
add index res_app_state(appid, server_state),
|
|
|
|
-- splitter, e.g.
|
|
|
|
|
2003-08-15 17:36:44 +00:00
|
|
|
add index res_filedel (file_delete_state),
|
2003-12-02 22:04:26 +00:00
|
|
|
-- file_deleter
|
|
|
|
|
|
|
|
add index res_userid_id(userid, id desc),
|
|
|
|
-- html_user/results.php
|
|
|
|
|
|
|
|
add index res_userid_val(userid, validate_state),
|
|
|
|
-- to show pending credit
|
|
|
|
|
2003-12-09 06:46:50 +00:00
|
|
|
add index res_hostid_id (hostid, id desc),
|
2003-12-02 22:04:26 +00:00
|
|
|
-- html_user/results.php
|
|
|
|
|
2003-10-16 18:10:56 +00:00
|
|
|
add index res_wu_user (workunitid, userid),
|
2003-12-02 22:04:26 +00:00
|
|
|
-- scheduler (avoid sending mult results of same WU to one user)
|
|
|
|
|
2003-11-11 20:49:07 +00:00
|
|
|
add index app_received_time (appid, received_time desc);
|
2003-12-02 22:04:26 +00:00
|
|
|
-- html_ops/result_summary.php
|
2003-01-03 21:55:05 +00:00
|
|
|
|
2004-06-24 21:00:46 +00:00
|
|
|
alter table msg_from_host
|
|
|
|
add index message_handled (handled);
|
|
|
|
-- for message handler
|
2004-03-17 01:26:44 +00:00
|
|
|
|
2004-06-24 21:00:46 +00:00
|
|
|
alter table msg_to_host
|
|
|
|
add index msg_to_host(hostid, handled);
|
2004-03-17 01:26:44 +00:00
|
|
|
-- for scheduler
|
2004-01-04 06:48:40 +00:00
|
|
|
|
2003-01-03 22:17:40 +00:00
|
|
|
alter table host
|
2003-01-31 07:19:20 +00:00
|
|
|
add index host_user (userid),
|
2003-12-02 22:04:26 +00:00
|
|
|
-- html_user/host_user.php
|
2003-01-31 07:19:20 +00:00
|
|
|
add index host_avg (expavg_credit desc),
|
2003-12-02 22:04:26 +00:00
|
|
|
-- db_dump.C
|
2003-01-31 07:19:20 +00:00
|
|
|
add index host_tot (total_credit desc);
|
2003-12-02 22:04:26 +00:00
|
|
|
-- db_dump.C
|
2003-10-24 20:13:50 +00:00
|
|
|
|
|
|
|
alter table profile
|
2003-12-31 23:09:21 +00:00
|
|
|
add fulltext index profile_reponse(response1, response2),
|
2004-06-01 17:02:14 +00:00
|
|
|
add index pro_uotd (uotd_time desc),
|
2003-10-24 20:13:50 +00:00
|
|
|
add unique profile_userid(userid);
|
2003-12-02 22:04:26 +00:00
|
|
|
|
|
|
|
alter table subscriptions
|
|
|
|
add unique sub_unique(userid, threadid);
|
2003-12-09 06:46:50 +00:00
|
|
|
|
2004-02-17 02:16:53 +00:00
|
|
|
alter table category
|
|
|
|
add unique cat1(name, is_helpdesk);
|
|
|
|
|
|
|
|
alter table forum
|
|
|
|
add unique(category, title);
|
|
|
|
|
2003-12-09 06:46:50 +00:00
|
|
|
alter table thread
|
|
|
|
add fulltext index thread_title(title);
|
|
|
|
|
|
|
|
alter table post
|
2003-12-21 05:55:48 +00:00
|
|
|
add index post_user (user),
|
|
|
|
add index post_thread (thread),
|
2003-12-09 06:46:50 +00:00
|
|
|
add fulltext index post_content(content);
|