Builds: index literally what latest-finished queries

This commit is contained in:
Graham Christensen
2020-02-09 15:48:11 -05:00
parent f0f41eaaff
commit 2637a7ad76
2 changed files with 5 additions and 0 deletions

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

@ -0,0 +1,4 @@
-- Index more exactly what the latest-finished query looks for.
create index IndexFinishedSuccessfulBuilds
on Builds(id DESC, buildstatus, finished, job, jobset_id)
where buildstatus = 0 and finished = 1;