Fix some broken indices
These indices basically did nothing since they put "id" first. In particular this makes /job/.../all much faster.
This commit is contained in:
parent
2922f45b4f
commit
87317812a8
|
@ -601,8 +601,8 @@ create index IndexBuildsOnProject on Builds(project);
|
||||||
create index IndexBuildsOnTimestamp on Builds(timestamp);
|
create index IndexBuildsOnTimestamp on Builds(timestamp);
|
||||||
create index IndexBuildsOnFinishedStopTime on Builds(finished, stoptime DESC);
|
create index IndexBuildsOnFinishedStopTime on Builds(finished, stoptime DESC);
|
||||||
create index IndexBuildsOnJobFinishedId on builds(project, jobset, job, system, finished, id DESC);
|
create index IndexBuildsOnJobFinishedId on builds(project, jobset, job, system, finished, id DESC);
|
||||||
create index IndexBuildsOnJobsetIdFinishedId on Builds(id DESC, finished, job, jobset_id);
|
create index IndexBuildsOnJobsetIdFinishedId on Builds(jobset_id, job, finished, id DESC);
|
||||||
create index IndexFinishedSuccessfulBuilds on Builds(id DESC, buildstatus, finished, job, jobset_id) where buildstatus = 0 and finished = 1;
|
create index IndexFinishedSuccessfulBuilds on Builds(jobset_id, job, finished, buildstatus, id DESC) where buildstatus = 0 and finished = 1;
|
||||||
create index IndexBuildsOnDrvPath on Builds(drvPath);
|
create index IndexBuildsOnDrvPath on Builds(drvPath);
|
||||||
create index IndexCachedHgInputsOnHash on CachedHgInputs(uri, branch, sha256hash);
|
create index IndexCachedHgInputsOnHash on CachedHgInputs(uri, branch, sha256hash);
|
||||||
create index IndexCachedGitInputsOnHash on CachedGitInputs(uri, branch, sha256hash);
|
create index IndexCachedGitInputsOnHash on CachedGitInputs(uri, branch, sha256hash);
|
||||||
|
|
5
src/sql/upgrade-68.sql
Normal file
5
src/sql/upgrade-68.sql
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
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;
|
Loading…
Reference in a new issue