Increase statistics targets for the derivation_inputs table
It has a lot of rows, and this seems to help the query planning for select-required-builds-that-failed, as I think it helps PostgreSQL better estimate the row counts that different parts of the query will produce.
This commit is contained in:
parent
150d9c4390
commit
6e390c9b9d
4 changed files with 23 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
-- Deploy guix-data-service:increase_derivation_inputs_statistics_targets to pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE derivation_inputs ALTER COLUMN derivation_id SET STATISTICS 10000;
|
||||
ALTER TABLE derivation_inputs ALTER COLUMN derivation_output_id SET STATISTICS 10000;
|
||||
|
||||
COMMIT;
|
||||
Loading…
Add table
Add a link
Reference in a new issue