From d8643908a7d6243c361e670573af763067db408d Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Wed, 16 Jan 2013 19:05:22 +0100 Subject: Bug 819432: Execute queries in two steps to improve performance r=dkl a=LpSolit --- report.cgi | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'report.cgi') diff --git a/report.cgi b/report.cgi index 69aadddbd..2949a18c3 100755 --- a/report.cgi +++ b/report.cgi @@ -164,13 +164,12 @@ my $search = new Bugzilla::Search( params => scalar $params->Vars, allow_unlimited => 1, ); -my $query = $search->sql; $::SIG{TERM} = 'DEFAULT'; $::SIG{PIPE} = 'DEFAULT'; -my $dbh = Bugzilla->switch_to_shadow_db(); -my $results = $dbh->selectall_arrayref($query); +Bugzilla->switch_to_shadow_db(); +my ($results, $extra_data) = $search->data; # We have a hash of hashes for the data itself, and a hash to hold the # row/col/table names. @@ -257,7 +256,7 @@ if ($formatparam eq "bar") { $vars->{'width'} = $width; $vars->{'height'} = $height; -$vars->{'query'} = $query; +$vars->{'queries'} = $extra_data; $vars->{'saved_report_id'} = $cgi->param('saved_report_id'); $vars->{'debug'} = $cgi->param('debug'); -- cgit v1.2.3-24-g4f1b