Closed
Bug 179193
Opened 23 years ago
Closed 23 years ago
anyexact should use IN, not OR
Categories
(Bugzilla :: Query/Bug List, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: bbaetz, Assigned: bbaetz)
References
Details
(Keywords: perf)
Attachments
(1 file, 1 obsolete file)
|
835 bytes,
patch
|
gerv
:
review+
|
Details | Diff | Splinter Review |
mysql optimises |foo IN (a,b,.....)| into a binary search. For OR, it tests each
one individually.
For the set of 'all duplicates in bugzilla', the difference between the two for
5 runs (of duplicates.cgi, see the patch on bug 176599) is 1min 3 sec vs 8
seconds. OK, this is probably several thousand bugs, but still...
I'm going to attach a patch which fixes this.
I know that pg barfs when it gets severl thousand things in an IF; if dkl can
come up with a ballpark numebr, we can split this into multiple INs.
| Assignee | ||
Comment 1•23 years ago
|
||
| Assignee | ||
Comment 2•23 years ago
|
||
Comment on attachment 105675 [details] [diff] [review]
fix
BTW, do I need the if, or can I be guarnateed that this routine will always be
called with at least one value in the list?
Comment 3•23 years ago
|
||
Comment on attachment 105675 [details] [diff] [review]
fix
r=gerv, although doesn't $term start off a "", obviating the need for the
"else"? Otherwise, looks sane to me.
Gerv
Attachment #105675 -
Flags: review+
| Assignee | ||
Comment 5•23 years ago
|
||
gerv: I don't know, hence my question. That code is Fun....
I'll check this in when I wake up
| Assignee | ||
Comment 6•23 years ago
|
||
OK, you're right - $term is set to undef before calling. I dropped the else,
and also dropped the if, since we skip out earlier earlier if trim($v) eq ''.
Attachment #105675 -
Attachment is obsolete: true
Comment 7•23 years ago
|
||
Comment on attachment 105720 [details] [diff] [review]
take 2
r=gerv.
Gerv
Attachment #105720 -
Flags: review+
| Assignee | ||
Comment 8•23 years ago
|
||
fixed.
dkl, if that pg bug isn't fixed in 7.3, then we can split this up as discussed
in comment 0
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•