IndexJobsetEvalsOnJobsetId: Only index jobsets with new builds

This commit is contained in:
Eelco Dolstra 2015-07-10 15:23:20 +02:00
parent b09f7e0989
commit 3bb9e17e5c
2 changed files with 3 additions and 1 deletions

View file

@ -623,4 +623,4 @@ create index IndexReleaseMembersOnBuild on ReleaseMembers(build);
create index IndexBuildsOnKeep on Builds(keep) where keep = 1; create index IndexBuildsOnKeep on Builds(keep) where keep = 1;
-- To get the most recent eval for a jobset. -- To get the most recent eval for a jobset.
create index IndexJobsetEvalsOnJobsetId on JobsetEvals(project, jobset, hasNewBuilds, id desc); create index IndexJobsetEvalsOnJobsetId on JobsetEvals(project, jobset, id desc) where hasNewBuilds = 1;

2
src/sql/upgrade-38.sql Normal file
View file

@ -0,0 +1,2 @@
drop index IndexJobsetEvalsOnJobsetId;
create index IndexJobsetEvalsOnJobsetId on JobsetEvals(project, jobset, id desc) where hasNewBuilds = 1;