Open Bug 364151 Opened 18 years ago Updated 11 years ago

Inefficient SQL: Selecting custom fields from fielddefs

Categories

(Bugzilla :: Bugzilla-General, defect, P5)

3.1.2

Tracking

()

People

(Reporter: bugzilla-mozilla, Unassigned)

References

Details

(Keywords: perf)

Attachments

(1 file)

When viewing one bug, the following SQL sometimes repeats and appears multiple times throughout a page load. Meaning: it first appears once. Then 3 times, etc.

In total, the following two SQL statements are executed 22 times (meaning 44 queries in total, where 2 should suffice):

SELECT id FROM fielddefs WHERE custom=1 AND obsolete=0
SELECT id,name,description,type,custom,mailhead,sortkey,obsolete,enter_bug FROM fielddefs WHERE id IN (85,86) ORDER BY sortkey, name

As you can see, I have 2 custom fields (duh).
Attached file SQL log
The whole SQL log. Not sure if MySQL actually logs every SQL statement. I thought it maybe didn't for prepared stuff. I've left the other SQL statements in there on purpose.
Keywords: perf
This is not a real perf issue, surprisingly. If you look at the results of DBI::Profile on any page (as I have), you'll see that every single call *total* on *multiple* pages for this call adds up to about 0.02 seconds.

Unless you can show an actual performance problem, this is WONTFIX or very low priority.
Severity: normal → minor
Priority: -- → P5
Version: 2.23.3 → 3.1.2
Bug 415652 should fix this problem.
Depends on: 415652
(In reply to comment #3)
> Bug 415652 should fix this problem.
> 

bkor, now that bug 415652 has been checked in, could you check if this is still a problem?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: