From 7e7cd3f5a95341179e0db0f7c8c825f6131c4bde Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 5 Mar 2023 10:18:30 +0000 Subject: Tweak the comparision query This seems to generate better plans. --- guix-data-service/comparison.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix-data-service/comparison.scm b/guix-data-service/comparison.scm index 4907357..dc521a4 100644 --- a/guix-data-service/comparison.scm +++ b/guix-data-service/comparison.scm @@ -345,7 +345,7 @@ SELECT base_packages.name, base_packages.version, SELECT 1 FROM blocked_builds WHERE blocked_derivation_output_details_set_id - = builds.derivation_output_details_set_id + = base_packages.derivation_output_details_set_id ) ) ORDER BY latest_build_status.timestamp @@ -376,7 +376,7 @@ SELECT base_packages.name, base_packages.version, SELECT 1 FROM blocked_builds WHERE blocked_derivation_output_details_set_id - = builds.derivation_output_details_set_id + = target_packages.derivation_output_details_set_id ) ) ORDER BY latest_build_status.timestamp -- cgit v1.2.3