hydra.sql: add an index for slow queries in production

These queries used to use (jobset, project) based indexes,
and the addition of jobset_id makes most of those indexes
unusable now.
This commit is contained in:
Graham Christensen
2020-02-11 12:52:28 -05:00
parent 834793468f
commit 027668f0db
2 changed files with 3 additions and 0 deletions

2
src/sql/upgrade-65.sql Normal file
View File

@ -0,0 +1,2 @@
-- Add an index like IndexBuildsOnJobFinishedId using jobset_id
create index IndexBuildsOnJobsetIdFinishedId on Builds(id DESC, finished, job, jobset_id);