aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/jobs
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-11-28 11:36:12 +0000
committerChristopher Baines <mail@cbaines.net>2022-11-28 11:36:12 +0000
commit1a0c5599ebd8b2870b2c7aef3ec6797a4c203cd2 (patch)
treecdf9893640aded43b42767b5532896e617389f69 /guix-data-service/jobs
parent38b36570132f8463cc763256aeab7613656278e6 (diff)
downloaddata-service-1a0c5599ebd8b2870b2c7aef3ec6797a4c203cd2.tar
data-service-1a0c5599ebd8b2870b2c7aef3ec6797a4c203cd2.tar.gz
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.
Diffstat (limited to 'guix-data-service/jobs')
-rw-r--r--guix-data-service/jobs/load-new-guix-revision.scm16
1 files changed, 16 insertions, 0 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm
index f60eaad..c1c27af 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -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")