From 88b4c4f55ddcb1deb590b36279aa5360be8b6d66 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 29 Nov 2011 18:48:11 +0100 Subject: [PATCH] Add another index to speed up the jobstatus page --- src/sql/hydra.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sql/hydra.sql b/src/sql/hydra.sql index 951a4b20..75402c13 100644 --- a/src/sql/hydra.sql +++ b/src/sql/hydra.sql @@ -532,8 +532,9 @@ 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 IndexBuildsOnJobsetFinishedTimestamp on Builds(project, jobset, finished, timestamp); +create index IndexBuildsOnJobsetFinishedTimestamp on Builds(project, jobset, finished, timestamp 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 IndexBuildsOnDrvPath on Builds(drvPath); create index IndexCachedHgInputsOnHash on CachedHgInputs(uri, branch, sha256hash); create index IndexCachedGitInputsOnHash on CachedGitInputs(uri, branch, sha256hash);