]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 63249 - The Bug Counts report was running very slowly due to unneeded fields...
authorjake%acutex.net <>
Tue, 23 Oct 2001 21:45:45 +0000 (21:45 +0000)
committerjake%acutex.net <>
Tue, 23 Oct 2001 21:45:45 +0000 (21:45 +0000)
Patch by Matthew Tuck <matty@chariot.net.au>
r= gerv@mozilla.org, jake@acutex.net

reports.cgi

index b7d9f3f552884b3c3c4af20b8bbc3598962a75fb..861622d73284e166ac285c6aee233792bd7165e2 100755 (executable)
@@ -268,32 +268,21 @@ FIN
     my $query;
     $query = <<FIN;
 select 
-    bugs.bug_id, bugs.assigned_to, bugs.bug_severity,
-    bugs.bug_status, bugs.product, 
+    bugs.bug_id,
+    bugs.bug_status,
     assign.login_name,
-    report.login_name,
     unix_timestamp(date_format(bugs.creation_ts, '%Y-%m-%d %h:%m:%s'))
 
 from   bugs,
-       profiles assign,
-       profiles report,
-       versions projector
+       profiles assign
 where  bugs.assigned_to = assign.userid
-and    bugs.reporter = report.userid
 FIN
 
     if ($FORM{'product'} ne "-All-" ) {
         $query .= "and    bugs.product=".SqlQuote($FORM{'product'});
     }
 
-    $query .= <<FIN;
-and      
-    ( 
-    bugs.bug_status = 'NEW' or 
-    bugs.bug_status = 'ASSIGNED' or 
-    bugs.bug_status = 'REOPENED'
-    )
-FIN
+    $query .= "AND bugs.bug_status IN ('NEW', 'ASSIGNED', 'REOPENED')";
 # End build up $query string
 
     print "<font color=purple><tt>$query</tt></font><p>\n" 
@@ -318,7 +307,7 @@ FIN
     #############################
 
     my $week = 60 * 60 * 24 * 7;
-    while (my ($bid, $a, $sev, $st, $prod, $who, $rep, $ts) = FetchSQLData()) {
+    while (my ($bid, $st, $who, $ts) = FetchSQLData()) {
         next if (exists $bugs_lookup{$bid});
         
         $bugs_lookup{$bid} ++;