Closed
Bug 364156
Opened 18 years ago
Closed 17 years ago
Inefficient SQL: Selects versions one-by-one
Categories
(Bugzilla :: Creating/Changing Bugs, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: bugzilla-mozilla, Unassigned)
References
Details
(Keywords: perf)
When viewing one bug, the following SQL statements are called.
SELECT value FROM versions
WHERE product_id = '7'
SELECT versions.value, versions.product_id FROM versions
WHERE value = '1.0.x'
AND product_id = '7'
SELECT versions.value, versions.product_id FROM versions
WHERE value = '1.2.x'
AND product_id = '7'
(etc)
This should obviously be changed. Ideally to just:
SELECT versions.value, versions.product_id FROM versions WHERE product_id = '7'
For the bug I am testing this on, the product has 15 versions. At least 14
queries are thus avoidable.
For the whole SQL log, please see attachment 248929 [details].
Reporter | ||
Updated•18 years ago
|
Summary: Inefficient SQL: Selects components one-by-one → Inefficient SQL: Selects versions one-by-one
Comment 1•18 years ago
|
||
If that takes more than 0.05 seconds, I'd be amazed. Using new_from_list would be good, and we plan to, but please understand that that would require actual enhancement, architecture-altering code, so I really need to see some *significant* profiling data for this.
Updated•18 years ago
|
Assignee: general → create-and-change
Component: Bugzilla-General → Creating/Changing Bugs
Reporter | ||
Comment 2•17 years ago
|
||
Has since been fixed.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•