mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-25 04:49:05 +01:00
Add composite indexes
This commit is contained in:
parent
203ccdf73b
commit
2de85b0120
@ -2,4 +2,7 @@ DROP INDEX IF EXISTS job_stats;
|
|||||||
DROP INDEX IF EXISTS job_by_user;
|
DROP INDEX IF EXISTS job_by_user;
|
||||||
DROP INDEX IF EXISTS job_by_starttime;
|
DROP INDEX IF EXISTS job_by_starttime;
|
||||||
DROP INDEX IF EXISTS job_by_job_id;
|
DROP INDEX IF EXISTS job_by_job_id;
|
||||||
DROP INDEX IF EXISTS job_by_state;
|
DROP INDEX IF EXISTS job_list;
|
||||||
|
DROP INDEX IF EXISTS job_list_user;
|
||||||
|
DROP INDEX IF EXISTS job_list_users;
|
||||||
|
DROP INDEX IF EXISTS job_list_users_start;
|
||||||
|
@ -2,4 +2,7 @@ CREATE INDEX IF NOT EXISTS job_stats ON job (cluster,subcluster,user);
|
|||||||
CREATE INDEX IF NOT EXISTS job_by_user ON job (user);
|
CREATE INDEX IF NOT EXISTS job_by_user ON job (user);
|
||||||
CREATE INDEX IF NOT EXISTS job_by_starttime ON job (start_time);
|
CREATE INDEX IF NOT EXISTS job_by_starttime ON job (start_time);
|
||||||
CREATE INDEX IF NOT EXISTS job_by_job_id ON job (job_id);
|
CREATE INDEX IF NOT EXISTS job_by_job_id ON job (job_id);
|
||||||
CREATE INDEX IF NOT EXISTS job_by_state ON job (job_state);
|
CREATE INDEX IF NOT EXISTS job_list ON job (cluster, job_state);
|
||||||
|
CREATE INDEX IF NOT EXISTS job_list_user ON job (user, cluster, job_state);
|
||||||
|
CREATE INDEX IF NOT EXISTS job_list_users ON job (user, job_state);
|
||||||
|
CREATE INDEX IF NOT EXISTS job_list_users_start ON job (start_time, user, job_state);
|
||||||
|
@ -2,4 +2,7 @@ DROP INDEX IF EXISTS job_stats;
|
|||||||
DROP INDEX IF EXISTS job_by_user;
|
DROP INDEX IF EXISTS job_by_user;
|
||||||
DROP INDEX IF EXISTS job_by_starttime;
|
DROP INDEX IF EXISTS job_by_starttime;
|
||||||
DROP INDEX IF EXISTS job_by_job_id;
|
DROP INDEX IF EXISTS job_by_job_id;
|
||||||
DROP INDEX IF EXISTS job_by_state;
|
DROP INDEX IF EXISTS job_list;
|
||||||
|
DROP INDEX IF EXISTS job_list_user;
|
||||||
|
DROP INDEX IF EXISTS job_list_users;
|
||||||
|
DROP INDEX IF EXISTS job_list_users_start;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
CREATE INDEX IF NOT EXISTS job_stats ON job (cluster,subcluster,user);
|
CREATE INDEX IF NOT EXISTS job_stats ON job (cluster,subcluster,user);
|
||||||
CREATE INDEX IF NOT EXISTS job_by_user ON job (user);
|
CREATE INDEX IF NOT EXISTS job_by_user ON job (user);
|
||||||
CREATE INDEX IF NOT EXISTS job_by_starttime ON job (start_time);
|
CREATE INDEX IF NOT EXISTS job_by_starttime ON job (start_time);
|
||||||
CREATE INDEX IF NOT EXISTS job_by_job_id ON job (job_id);
|
CREATE INDEX IF NOT EXISTS job_by_job_id ON job (job_id, cluster, start_time);
|
||||||
CREATE INDEX IF NOT EXISTS job_by_state ON job (job_state);
|
CREATE INDEX IF NOT EXISTS job_list ON job (cluster, job_state);
|
||||||
|
CREATE INDEX IF NOT EXISTS job_list_user ON job (user, cluster, job_state);
|
||||||
|
CREATE INDEX IF NOT EXISTS job_list_users ON job (user, job_state);
|
||||||
|
CREATE INDEX IF NOT EXISTS job_list_users_start ON job (start_time, user, job_state);
|
||||||
|
Loading…
Reference in New Issue
Block a user