Get rid of some obsolete indexes

This commit is contained in:
Eelco Dolstra 2014-09-29 22:29:11 +02:00
parent 1c20cfdf24
commit 773c7e89cf
2 changed files with 4 additions and 6 deletions

View file

@ -549,16 +549,11 @@ create index IndexBuildsOnFinishedBusy on Builds(finished, busy);
create index IndexBuildsOnIsCurrent on Builds(isCurrent);
create index IndexBuildsOnJobsetIsCurrent on Builds(project, jobset, isCurrent);
create index IndexBuildsOnJobIsCurrent on Builds(project, jobset, job, isCurrent);
--create index IndexBuildsOnJob on Builds(project, jobset, job);
--create index IndexBuildsOnJobAndIsCurrent on Builds(project, jobset, job, isCurrent);
create index IndexBuildsOnJobAndSystem on Builds(project, jobset, job, system);
create index IndexBuildsOnJobset on Builds(project, jobset);
create index IndexBuildsOnProject on Builds(project);
create index IndexBuildsOnTimestamp on Builds(timestamp);
create index IndexBuildsOnFinishedStopTime on Builds(finished, stoptime DESC);
create index IndexBuildsOnJobsetFinishedTimestamp on Builds(project, jobset, finished, timestamp DESC); -- obsolete?
create index IndexBuildsOnJobFinishedId on builds(project, jobset, job, system, finished, id DESC);
create index IndexBuildsOnJobSystemCurrent on Builds(project, jobset, job, system, isCurrent);
create index IndexBuildsOnDrvPath on Builds(drvPath);
create index IndexCachedHgInputsOnHash on CachedHgInputs(uri, branch, sha256hash);
create index IndexCachedGitInputsOnHash on CachedGitInputs(uri, branch, sha256hash);
@ -573,7 +568,6 @@ create index IndexReleaseMembersOnBuild on ReleaseMembers(build);
-- For hydra-update-gc-roots.
create index IndexBuildsOnKeep on Builds(keep);
create index IndexMostRecentSuccessfulBuilds on Builds(project, jobset, job, system, finished, buildStatus, id desc);
-- To get the most recent eval for a jobset.
create index IndexJobsetEvalsOnJobsetId on JobsetEvals(project, jobset, hasNewBuilds, id desc);

4
src/sql/upgrade-29.sql Normal file
View file

@ -0,0 +1,4 @@
drop index IndexBuildsOnJobAndSystem;
drop index IndexBuildsOnJobSystemCurrent;
drop index IndexBuildsOnJobsetFinishedTimestamp;
drop index IndexMostRecentSuccessfulBuilds;