From 7dce194de7116a1a957c3b4620cbfe12485afd6b Mon Sep 17 00:00:00 2001 From: Andreas Barth Date: Sun, 11 Apr 2010 12:05:54 +0000 Subject: [PATCH] partly undo 7ce88f5df6216220b52607f09facaf312cb971c7 as that one was way slower with all and installed. --- bin/wanna-build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/wanna-build b/bin/wanna-build index e02706d..9080dc7 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -2542,9 +2542,15 @@ sub get_all_source_info { my %options = @_; my $q = "SELECT rel, priority, state_change, permbuildpri, section, buildpri, failed, state, binary_nmu_changelog, bd_problem, version, package, distribution, installed_version, notes, failed_category, builder, old_failed, previous_state, binary_nmu_version, depends, extract(days from date_trunc('days', now() - state_change)) as state_days" - . ", (SELECT max(build_time) FROM ".pkg_history_table_name()." WHERE pkg_history.package = packages.package AND pkg_history.distribution = packages.distribution AND result = 'successful') AS successtime" - . ", (SELECT max(build_time) FROM ".pkg_history_table_name()." WHERE pkg_history.package = packages.package AND pkg_history.distribution = packages.distribution ) AS anytime" +# . ", (SELECT max(build_time) FROM ".pkg_history_table_name()." WHERE pkg_history.package = packages.package AND pkg_history.distribution = packages.distribution AND result = 'successful') AS successtime" +# . ", (SELECT max(build_time) FROM ".pkg_history_table_name()." WHERE pkg_history.package = packages.package AND pkg_history.distribution = packages.distribution ) AS anytime" . " FROM " . table_name() + . " left join ( " + . "select distinct on (package, distribution) build_time, package, distribution from ".pkg_history_table_name()." where result = 'successful' order by package, distribution, timestamp " + . " ) as successtime using (package, distribution) " + . " left join ( " + . "select distinct on (package, distribution) build_time, package, distribution from ".pkg_history_table_name()." order by package, distribution, timestamp desc" + . " ) as anytime using (package, distribution) " . " WHERE TRUE "; my @args = (); if ($distribution) { -- 2.39.2