hydra/src/sql/upgrade-68.sql
Eelco Dolstra 87317812a8 Fix some broken indices
These indices basically did nothing since they put "id" first.

In particular this makes /job/.../all much faster.
2020-10-28 14:30:44 +01:00

6 lines
319 B
SQL

drop index IndexBuildsOnJobsetIdFinishedId;
create index IndexBuildsOnJobsetIdFinishedId on Builds(jobset_id, job, finished, id DESC);
drop index IndexFinishedSuccessfulBuilds;
create index IndexFinishedSuccessfulBuilds on Builds(jobset_id, job, finished, buildstatus, id DESC) where buildstatus = 0 and finished = 1;