aboutsummaryrefslogtreecommitdiffstats
path: root/reports.cgi
diff options
context:
space:
mode:
authorjake%acutex.net <>2001-10-23 21:45:45 +0000
committerjake%acutex.net <>2001-10-23 21:45:45 +0000
commit35f74cea13f5d1ce63d56cd643d2f2963bbb90a5 (patch)
tree482db5244b87a2f52a15905849cf9cf6752df85b /reports.cgi
parent1a7dfa3a2850476442545f60f7795db8bcbdd56d (diff)
downloadbugs-35f74cea13f5d1ce63d56cd643d2f2963bbb90a5.tar
bugs-35f74cea13f5d1ce63d56cd643d2f2963bbb90a5.tar.gz
bugs-35f74cea13f5d1ce63d56cd643d2f2963bbb90a5.tar.bz2
bugs-35f74cea13f5d1ce63d56cd643d2f2963bbb90a5.tar.xz
bugs-35f74cea13f5d1ce63d56cd643d2f2963bbb90a5.zip
Bug 63249 - The Bug Counts report was running very slowly due to unneeded fields/joins in the SQL query.
Patch by Matthew Tuck <matty@chariot.net.au> r= gerv@mozilla.org, jake@acutex.net
Diffstat (limited to 'reports.cgi')
-rwxr-xr-xreports.cgi21
1 files changed, 5 insertions, 16 deletions
diff --git a/reports.cgi b/reports.cgi
index b7d9f3f55..861622d73 100755
--- a/reports.cgi
+++ b/reports.cgi
@@ -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} ++;