Closed Bug 232150 Opened 21 years ago Closed 21 years ago

bug change queries take forever


(Bugzilla :: Query/Bug List, defect)

Not set



Bugzilla 2.18


(Reporter: myk, Assigned: myk)




(2 files, 1 obsolete file)

Querying for bugs where any field changed between two dates optimizes poorly and
takes forever, stalling replication in the process.
What changed? What was teh query on the old version?
Looks like it was the checkin for bug 37749 that did it.  Looks like it only
happens when you select [bug creation] along with the other fields.  Selecting
every field but that one is slow, but returns results after a minute or two.

Here's the relevant portion of the two queries with all the "actcheck.fieldid =
##" stuff replaced by ellipses:

((creation_ts >= '2003-03-09 00:00:00') OR (actcheck.bug_id = bugs.bug_id AND
(...) AND actcheck.bug_when >= '2003-03-09 00:00:00'))
                                          ((actcheck.bug_id = bugs.bug_id AND
(...) AND actcheck.bug_when >= '2003-03-09 00:00:00'))

The first portion is from the failing query; the second is from the working one.
Right. We should undo that change, and then fix the bug to move bug_creation
into the advanced query options for those who really really want that.
Attached patch patch v1: fixes problem (obsolete) — Splinter Review
Attachment #139876 - Flags: review?(bbaetz)
Applying to b.m.o so we can get replication working again.
Whiteboard: [applied to b.m.o]
Attachment #139876 - Flags: review?(bbaetz)
Attachment #139877 - Flags: review?(bbaetz)
Comment on attachment 139877 [details] [diff] [review]
patch v2: oops, a couple stray ANDs got left in there

We should remove 'bug creation' from that list, and move it to the advanced
query stuff. Ther another bug on moving it.

r=bbaetz anyway
Attachment #139877 - Flags: review?(bbaetz) → review+
Checking in;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/,v  <--
new revision: 1.50; previous revision: 1.49
Closed: 21 years ago
Flags: approval+
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 2.18
I had this problem with my Bugzilla 2.17.6. Bug creation search was very slow. 
But the search on other changes (other than bug creation) worked. When I 
applied this patch it fixed the bug creation problem but now it is very slow 
if I choose other changes. It seems that (in my case) either the bug creation 
can work (using this patch) or other changes but not both. I am not able to 
reproduce this using b.m.o.  
Whiteboard: [applied to b.m.o]
Assignee: justdave → myk
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.