Open
Bug 394360
Opened 18 years ago
Updated 2 years ago
Reports should not retrieve a record per bug
Categories
(Bugzilla :: Reporting/Charting, defect)
Bugzilla
Reporting/Charting
Tracking
()
NEW
People
(Reporter: bugzilla-mozilla, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
2.11 KB,
patch
|
Details | Diff | Splinter Review |
Instead of:
SELECT map_products.name, 42217354, 42217354 FROM bugs INNER JOIN products AS map_products ON (bugs.product_id = map_products.id) LEFT JOIN bug_group_map ON bug_group_map.bug_id = bugs.bug_id WHERE ((bugs.bug_status IN ('NEW','ASSIGNED','REOPENED'))) AND bugs.creation_ts IS NOT NULL AND ((bug_group_map.group_id IS NULL)) GROUP BY bugs.bug_id
It should do something like:
SELECT map_products.name, 42217354, 42217354, COUNT(DISTINCT bugs.bug_id) AS bugcount FROM bugs INNER JOIN products AS map_products ON (bugs.product_id = map_products.id) LEFT JOIN bug_group_map ON bug_group_map.bug_id = bugs.bug_id WHERE ((bugs.bug_status IN ('NEW','ASSIGNED','REOPENED'))) AND bugs.creation_ts IS NOT NULL AND ((bug_group_map.group_id IS NULL)) GROUP BY map_products.name
However, the latter is actually up to 100% slower in MySQL 5.0.45. Need to figure out why.
![]() |
||
Updated•18 years ago
|
Assignee: gerv → charting
Updated•2 years ago
|
Attachment #9387179 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•