diff --git a/src/sql/hydra.sql b/src/sql/hydra.sql index 4562dc41..3001ab10 100644 --- a/src/sql/hydra.sql +++ b/src/sql/hydra.sql @@ -564,6 +564,7 @@ create index IndexBuildsOnJobAndSystem on Builds(project, jobset, job, system); create index IndexBuildsOnJobset on Builds(project, jobset); create index IndexBuildsOnProject on Builds(project); 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 IndexBuildsOnJobFinishedId on builds(project, jobset, job, system, finished, id DESC); create index IndexBuildsOnJobSystemCurrent on Builds(project, jobset, job, system, isCurrent); diff --git a/src/sql/upgrade-18.sql b/src/sql/upgrade-18.sql new file mode 100644 index 00000000..acd1f397 --- /dev/null +++ b/src/sql/upgrade-18.sql @@ -0,0 +1 @@ +create index IndexBuildsOnFinishedStopTime on Builds(finished, stoptime DESC);