Index builds on stop time

This is necessary to make the /all page fast, since it sorts builds on
descending stop time.
This commit is contained in:
Eelco Dolstra 2013-08-12 20:16:28 +02:00
parent 452c8e36d1
commit 84acccb3ea
2 changed files with 2 additions and 0 deletions

View file

@ -564,6 +564,7 @@ create index IndexBuildsOnJobAndSystem on Builds(project, jobset, job, system);
create index IndexBuildsOnJobset on Builds(project, jobset); create index IndexBuildsOnJobset on Builds(project, jobset);
create index IndexBuildsOnProject on Builds(project); 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 IndexBuildsOnJobsetFinishedTimestamp on Builds(project, jobset, finished, timestamp DESC); -- obsolete? create index IndexBuildsOnJobsetFinishedTimestamp on Builds(project, jobset, finished, timestamp DESC); -- obsolete?
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 IndexBuildsOnJobSystemCurrent on Builds(project, jobset, job, system, isCurrent); create index IndexBuildsOnJobSystemCurrent on Builds(project, jobset, job, system, isCurrent);

1
src/sql/upgrade-18.sql Normal file
View file

@ -0,0 +1 @@
create index IndexBuildsOnFinishedStopTime on Builds(finished, stoptime DESC);