server: Replace host index on userid with one based on userid and host_cpid

This commit is contained in:
Kevin Reed 2018-09-07 10:10:03 -05:00
parent 77f9078398
commit 436409a40b
2 changed files with 5 additions and 5 deletions

View File

@ -81,12 +81,11 @@ alter table msg_to_host
-- for scheduler
alter table host
add index host_user (userid),
add index host_userid_cpid (userid, host_cpid),
-- html_user/host_user.php
add index host_cpid (host_cpid),
-- scheduler request for user with many hosts
-- sched/handle_request.cpp for user with many hosts
add index host_domain_name (domain_name),
-- scheduler request for user with many hosts
-- sched/handle_request.cpp for user with many hosts
add index host_avg (expavg_credit desc),
-- db_dump.C
add index host_tot (total_credit desc);

View File

@ -1163,7 +1163,8 @@ function update_5_9_2018() {
}
function update_8_23_2018() {
$retval = do_query("alter table host add index host_cpid (host_cpid)");
$retval = do_query("alter table host add index host_userid_cpid (userid, host_cpid)");
$retval = $retval && do_query("alter table host drop index host_user");
return $retval && do_query("alter table host add index host_domain_name (domain_name)");
}