forked from lix-project/hydra
Builds: index literally what latest-finished queries
This commit is contained in:
parent
f0f41eaaff
commit
2637a7ad76
|
@ -682,6 +682,7 @@ create index IndexBuildsOnProject on Builds(project);
|
|||
create index IndexBuildsOnTimestamp on Builds(timestamp);
|
||||
create index IndexBuildsOnFinishedStopTime on Builds(finished, stoptime DESC);
|
||||
create index IndexBuildsOnJobFinishedId on builds(project, jobset, job, system, finished, id DESC);
|
||||
create index IndexFinishedSuccessfulBuilds on Builds(id DESC, buildstatus, finished, job, jobset_id) where buildstatus = 0 and finished = 1;
|
||||
create index IndexBuildsOnDrvPath on Builds(drvPath);
|
||||
create index IndexCachedHgInputsOnHash on CachedHgInputs(uri, branch, sha256hash);
|
||||
create index IndexCachedGitInputsOnHash on CachedGitInputs(uri, branch, sha256hash);
|
||||
|
|
4
src/sql/upgrade-65.sql
Normal file
4
src/sql/upgrade-65.sql
Normal file
|
@ -0,0 +1,4 @@
|
|||
-- Index more exactly what the latest-finished query looks for.
|
||||
create index IndexFinishedSuccessfulBuilds
|
||||
on Builds(id DESC, buildstatus, finished, job, jobset_id)
|
||||
where buildstatus = 0 and finished = 1;
|
Loading…
Reference in a new issue