diff --git a/src/sql/hydra.sql b/src/sql/hydra.sql index 7384ebcd..e10e68fe 100644 --- a/src/sql/hydra.sql +++ b/src/sql/hydra.sql @@ -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); diff --git a/src/sql/upgrade-29.sql b/src/sql/upgrade-29.sql new file mode 100644 index 00000000..40f78e8b --- /dev/null +++ b/src/sql/upgrade-29.sql @@ -0,0 +1,4 @@ +drop index IndexBuildsOnJobAndSystem; +drop index IndexBuildsOnJobSystemCurrent; +drop index IndexBuildsOnJobsetFinishedTimestamp; +drop index IndexMostRecentSuccessfulBuilds;