Do derivation inputs and outputs housekeeping at the end of each job

This should help with query performance, as the recursive queries using
derivation_inputs and derivation_outputs are particularly sensitive to the
n_distinct values for these tables.
This commit is contained in:
Christopher Baines 2022-11-28 11:36:12 +00:00
parent 38b3657013
commit 1a0c5599eb
2 changed files with 80 additions and 1 deletions

View file

@ -2142,6 +2142,22 @@ SKIP LOCKED")
"vacuuming package derivations by guix revision range table"
(vacuum-package-derivations-table conn))
(with-time-logging
"update-derivation-inputs-statistics"
(update-derivation-inputs-statistics conn))
(with-time-logging
"vacuum-derivation-inputs-table"
(vacuum-derivation-inputs-table conn))
(with-time-logging
"update-derivation-outputs-statistics"
(update-derivation-outputs-statistics conn))
(with-time-logging
"vacuum-derivation-outputs-table"
(vacuum-derivation-outputs-table conn))
#t)
(begin
(exec-query conn "ROLLBACK")