forked from lix-project/hydra
Index BuildSteps on propagatedFrom
This significantly speeds up deleting Builds, since it removes the need for a sequential scan on BuildSteps.
This commit is contained in:
parent
bbee81efae
commit
d8acaf2181
|
@ -594,6 +594,7 @@ create index IndexBuildProducstOnBuildAndType on BuildProducts(build, type);
|
||||||
create index IndexBuildProductsOnBuild on BuildProducts(build);
|
create index IndexBuildProductsOnBuild on BuildProducts(build);
|
||||||
create index IndexBuildStepsOnBusy on BuildSteps(busy) where busy = 1;
|
create index IndexBuildStepsOnBusy on BuildSteps(busy) where busy = 1;
|
||||||
create index IndexBuildStepsOnDrvPath on BuildSteps(drvpath);
|
create index IndexBuildStepsOnDrvPath on BuildSteps(drvpath);
|
||||||
|
create index IndexBuildStepsOnPropagatedFrom on BuildSteps(propagatedFrom) where propagatedFrom is not null;
|
||||||
create index IndexBuildStepOutputsOnPath on BuildStepOutputs(path);
|
create index IndexBuildStepOutputsOnPath on BuildStepOutputs(path);
|
||||||
create index IndexBuildsOnFinished on Builds(finished) where finished = 0;
|
create index IndexBuildsOnFinished on Builds(finished) where finished = 0;
|
||||||
create index IndexBuildsOnFinishedBusy on Builds(finished, busy) where finished = 0;
|
create index IndexBuildsOnFinishedBusy on Builds(finished, busy) where finished = 0;
|
||||||
|
|
1
src/sql/upgrade-36.sql
Normal file
1
src/sql/upgrade-36.sql
Normal file
|
@ -0,0 +1 @@
|
||||||
|
create index IndexBuildStepsOnPropagatedFrom on BuildSteps(propagatedFrom) where propagatedFrom is not null;
|
Loading…
Reference in a new issue