Closed Bug 905925 Opened 11 years ago Closed 11 years ago

add attachment.ispatch index

Categories

(bugzilla.mozilla.org :: General, defect)

Production
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: glob, Assigned: glob)

Details

(Brandon Johnson [:cyborgshadow] from Bug 900328 comment #5)
> Just chiming in here. Your query could be optimized by adding an index on
> the attachments.ispatch column.
> 
> Right now this query only looks at 2 columns from attachments (ispatch,
> attach_id), the latter to satisfy the join, but it's also the PK. If we make
> an index on ispatch,the explain plan can benefit from "USING INDEX" on the
> attachments table.
> 
> Because ispatch isn't indexed at all, it has to do a full table scan against
> 784 thousand rows and evaluate them.
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/
modified Bugzilla/DB/Schema.pm
modified Bugzilla/Install/DB.pm
Committed revision 8950.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Summary: add attachment.is_patch index → add attachment.ispatch index
You need to log in before you can comment on or make changes to this bug.