db: additional index

Fixes: https://pagure.io/koji/issue/2418
This commit is contained in:
Tomas Kopecek 2020-08-04 10:15:10 +02:00
parent 9fb819310a
commit f49d2fdbe9
2 changed files with 10 additions and 0 deletions

View file

@ -238,6 +238,7 @@ CREATE TABLE task (
CREATE INDEX task_by_state ON task (state);
-- CREATE INDEX task_by_parent ON task (parent); (unique condition creates similar index)
CREATE INDEX task_by_host ON task (host_id);
CREATE INDEX task_by_no_parent_state_method ON task(parent, state, method) WHERE parent IS NULL;
-- by package, we mean srpm