Closed
Bug 59996
Opened 25 years ago
Closed 25 years ago
certain queries take too long
Categories
(Bugzilla :: Bugzilla-General, defect, P3)
Tracking
()
People
(Reporter: dmosedale, Assigned: justdave)
Details
The following query:
deselect status, uncheck assigned to, check cc and added comment
email 'redhat.com'
Takes a very long time.
The following SQL is used to do the search:
SELECT bugs.bug_id, bugs.groupset, date_format(bugs.creation_ts,'%Y-%m-%d'),
date_format(bugs.delta_ts,'%Y-%m-%d'), substring(bugs.bug_severity, 1, 3),
substring(bugs.priority, 1, 3), substring(bugs.rep_platform, 1, 3),
map_assigned_to.login_name, substring(bugs.bug_status,1,4),
substring(bugs.resolution,1,4), bugs.keywords, substring(bugs.short_desc, 1, 60)
FROM bugs, profiles map_assigned_to, profiles map_reporter LEFT JOIN profiles
map_qa_contact ON bugs.qa_contact = map_qa_contact.userid, longdescs longdescs_
LEFT JOIN profiles longdescnames_ ON longdescs_.who = longdescnames_.userid LEFT
JOIN cc cc_ ON bugs.bug_id = cc_.bug_id LEFT JOIN profiles map_cc_ ON cc_.who =
map_cc_.userid WHERE bugs.assigned_to = map_assigned_to.userid AND bugs.reporter
= map_reporter.userid AND bugs.groupset & 9223372036854775807 = bugs.groupset
AND longdescs_.bug_id = bugs.bug_id AND (INSTR(LOWER(map_cc_.login_name),
'redhat.com') OR INSTR(LOWER(longdescnames_.login_name), 'redhat.com')) GROUP BY
bugs.bug_id ORDER BY map_assigned_to.login_name, bugs.priority, bugs.bug_s
Part of (maybe the entire) problem is due to the fact that the tables aren't
normalized and lots of the fields are substring compares (which therefore can't
use indexes). Perhaps full-string compares might actually be faster because
indexes could be used. In any case, need to look at this more closely with
EXPLAIN and figure out what else we can do to speed this up.
Comment 2•25 years ago
|
||
Yes, certainly a dup.
*** This bug has been marked as a duplicate of 57350 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 4•24 years ago
|
||
moving to Bugzilla product
reassign to default owner/qa for INVALID/WONTFIX/WORKSFORME/DUPLICATE
Assignee: dmose → justdave
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
Version: other → unspecified
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
•