summaryrefslogtreecommitdiff
path: root/src/schema.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/schema.sql')
-rw-r--r--src/schema.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/schema.sql b/src/schema.sql
index 8d3a651..65aebbd 100644
--- a/src/schema.sql
+++ b/src/schema.sql
@@ -61,8 +61,8 @@ CREATE TABLE Builds (
);
-- Create indexes to speed up common queries, in particular those
--- corresponding to /api/latestbuilds HTTP requests.
-CREATE INDEX Builds_Derivations_index ON Builds(status ASC, derivation, evaluation, stoptime DESC);
+-- corresponding to /api/latestbuilds and /api/queue HTTP requests.
+CREATE INDEX Builds_Derivations_index ON Builds(status ASC, timestamp ASC, id, derivation, evaluation, stoptime DESC);
CREATE INDEX Specifications_index ON Specifications(repo_name, branch);
CREATE INDEX Derivations_index ON Derivations(derivation, evaluation, job_name, system);