guix-data-service/sqitch/deploy/increase_derivation_inputs_statistics_targets.sql
Christopher Baines 6e390c9b9d 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.
2020-12-27 10:37:06 +00:00

8 lines
263 B
PL/PgSQL

-- 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;