These indices basically did nothing since they put "id" first. In particular this makes /job/.../all much faster.
6 lines
319 B
SQL
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;
|