Closed
Bug 364157
Opened 18 years ago
Closed 17 years ago
Inefficient SQL: Selects milestones 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 milestones WHERE product_id = '7' ORDER BY sortkey
SELECT milestones.value, milestones.product_id, milestones.sortkey FROM milestones WHERE value = '2.4.9' AND product_id = '7'
SELECT milestones.value, milestones.product_id, milestones.sortkey FROM milestones WHERE value = '2.6.9' AND product_id = '7'
(etc)
This should obviously be changed. Ideally to just:
SELECT milestones.value, milestones.product_id, milestones.sortkey FROM milestones WHERE product_id = '7' ORDER BY sortkey
For the bug I am testing this on, the product has 88 milestones. At least 87
queries are thus avoidable.
For the whole SQL log, please see attachment 248929 [details].
Comment 1•18 years ago
|
||
And how long does it take to run those 88 SQL queries? 0.05-0.1 seconds is what I'd guess, based on my landfill DBI profiling.
Updated•18 years ago
|
Assignee: general → create-and-change
Severity: normal → minor
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
•