bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

add attachment.ispatch index

RESOLVED FIXED

Status

()

bugzilla.mozilla.org
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: glob, Assigned: glob)

Tracking

Production
x86
Mac OS X

Details

(Assignee)

Description

5 years ago
(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.
(Assignee)

Comment 1

5 years ago
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
Last Resolved: 5 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.