aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sqitch/deploy/package_derivations_extended_statistics.sql9
-rw-r--r--sqitch/revert/package_derivations_extended_statistics.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/verify/package_derivations_extended_statistics.sql7
4 files changed, 24 insertions, 0 deletions
diff --git a/sqitch/deploy/package_derivations_extended_statistics.sql b/sqitch/deploy/package_derivations_extended_statistics.sql
new file mode 100644
index 0000000..f1aeaaf
--- /dev/null
+++ b/sqitch/deploy/package_derivations_extended_statistics.sql
@@ -0,0 +1,9 @@
+-- Deploy guix-data-service:package_derivations_extended_statistics to pg
+
+BEGIN;
+
+CREATE STATISTICS package_derivations_mcv (mcv) ON system_id, target FROM package_derivations;
+
+CREATE STATISTICS package_derivations_ndistinct (ndistinct) ON system_id, target FROM package_derivations;
+
+COMMIT;
diff --git a/sqitch/revert/package_derivations_extended_statistics.sql b/sqitch/revert/package_derivations_extended_statistics.sql
new file mode 100644
index 0000000..65f3208
--- /dev/null
+++ b/sqitch/revert/package_derivations_extended_statistics.sql
@@ -0,0 +1,7 @@
+-- Revert guix-data-service:package_derivations_extended_statistics from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 5af890d..8bc4aeb 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -90,3 +90,4 @@ fix_git_commits_duplicates 2022-06-17T10:39:50Z Chris <chris@felis> # Fix git_co
git_repositories_query_substitutes 2022-09-09T11:35:16Z Chris <chris@felis> # Add git_repositories.query_substitutes
package_derivations_id_package_id_idx 2022-09-14T09:24:30Z Chris <chris@felis> # Add index on package_derivations id and package_id
blocked_builds 2022-11-07T11:27:28Z Chris <chris@felis> # Add blocked_builds
+package_derivations_extended_statistics 2022-11-12T10:40:18Z Chris <chris@felis> # Add extended statistics on package_derivations
diff --git a/sqitch/verify/package_derivations_extended_statistics.sql b/sqitch/verify/package_derivations_extended_statistics.sql
new file mode 100644
index 0000000..1053d91
--- /dev/null
+++ b/sqitch/verify/package_derivations_extended_statistics.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:package_derivations_extended_statistics on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;