diff options
author | lpsolit%gmail.com <> | 2006-12-28 08:26:11 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-12-28 08:26:11 +0000 |
commit | 65cfd8b5587109693762e9d2cd6e7e651eb79fdd (patch) | |
tree | 3cc398c72b0f77425fbb0895be17fbe61e2b8563 /Bugzilla | |
parent | 5bc2bc891aed93c67acc48710fd662d35bbb696b (diff) | |
download | bugs-65cfd8b5587109693762e9d2cd6e7e651eb79fdd.tar bugs-65cfd8b5587109693762e9d2cd6e7e651eb79fdd.tar.gz bugs-65cfd8b5587109693762e9d2cd6e7e651eb79fdd.tar.bz2 bugs-65cfd8b5587109693762e9d2cd6e7e651eb79fdd.tar.xz bugs-65cfd8b5587109693762e9d2cd6e7e651eb79fdd.zip |
Bug 365179: Performance problems with multiple fields chosen in the "where one or more of the following changed" box - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Search.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index c20abc418..9215dc70d 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -333,14 +333,14 @@ sub init { push(@l, "bugs.creation_ts <= $sql_chto") if($sql_chto); $bug_creation_clause = "(" . join(' AND ', @l) . ")"; } else { - push(@actlist, "actcheck.fieldid = " . get_field_id($f)); + push(@actlist, get_field_id($f)); } } # @actlist won't have any elements if the only field being searched # is [Bug creation] (in which case we don't need bugs_activity). if(@actlist) { - my $extra = " AND actcheck.bug_id = bugs.bug_id"; + my $extra = " actcheck.bug_id = bugs.bug_id"; push(@list, "(actcheck.bug_when IS NOT NULL)"); if($sql_chfrom) { $extra .= " AND actcheck.bug_when >= $sql_chfrom"; @@ -352,7 +352,8 @@ sub init { $extra .= " AND actcheck.added = $sql_chvalue"; } push(@supptables, "LEFT JOIN bugs_activity AS actcheck " . - "ON (" . join(" OR ", @actlist) . "$extra )"); + "ON $extra AND actcheck.fieldid IN (" . + join(",", @actlist) . ")"); } # Now that we're done using @list to determine if there are any |