diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2018-04-10 17:21:06 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2018-04-10 17:21:06 +0200 |
| commit | 238f856e48ee333ed3e19fa32ce5e1742c650c67 (patch) | |
| tree | faba105b2d02d581201feedf27b45e774af3b21a | |
| parent | Use the 2.2 'setvbuf' API style. (diff) | |
| download | cuirass-238f856e48ee333ed3e19fa32ce5e1742c650c67.tar.gz | |
database: Adjust index to speed up /api/queue queries.
* src/schema.sql: Extend 'Builds_Derivations_index' to account for
/api/queue queries.
| -rw-r--r-- | src/schema.sql | 4 |
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); |
