Closed
Bug 634722
Opened 14 years ago
Closed 11 years ago
Perform index audit on reports table [tracker]
Categories
(Socorro :: General, task)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jberkus, Assigned: laura)
References
Details
Attachments
(4 files)
While looking at bug 613379, I did some poking around the indexes on "reports" and I've realized that this rather central table is not indexed optimally. Several indexes exist for things which are almost never searched on, whereas there are no good indexes for some common searches.
I would like to perform an index audit of the reports table and rejigger its indexes to comply with the searches which are actually being performed. This should take 3-5 hours of billable time, plus some additional for deployment to production.
Approved, Laura?
| Reporter | ||
Comment 1•14 years ago
|
||
Attached is a list of unused indexes. This suggests that the following indexes could be dropped:
extensions_*_extension_id_extension_version_idx on all extensions partitions; utterly unused.
the index:
reports_*_unique_uuid
on all reports partitions is a duplicate of another index on UUID, and can also be dropped.
reports_*_hangid is a bit less clear. On the one hand, those indexes aren't much used. On the other hand, they are quite small. I'm inclined to leave those indexes alone for now.
| Reporter | ||
Comment 2•14 years ago
|
||
actually: reports_*_unique_uuid should be retained, and the duplicate index reports_*_uuid_key, which is not unique, should be dropped.
Patches to come.
| Reporter | ||
Comment 3•14 years ago
|
||
Drop indexes script
| Reporter | ||
Comment 4•14 years ago
|
||
| Reporter | ||
Comment 5•14 years ago
|
||
That takes care of dropping indexes. Adding needed indexes is more complicated, and should be tackled after the all-hands.
| Assignee | ||
Updated•14 years ago
|
Target Milestone: 1.7.8 → 2.0
| Reporter | ||
Comment 6•14 years ago
|
||
Being split into two bugs, one for removing indexes, one for adding them.
Summary: Perform index audit on reports table → Perform index audit on reports table [tracker]
| Assignee | ||
Updated•14 years ago
|
Assignee: josh → mpressman
| Assignee | ||
Comment 7•14 years ago
|
||
mpressman, status?
Comment 8•14 years ago
|
||
unnecessary and duplicate indexes have been removed
| Assignee | ||
Comment 9•14 years ago
|
||
Can we close this out then? Also, can you give us a quick summary of work done? (ie what did we get rid of?)
Comment 10•14 years ago
|
||
I executed the scripts that were attached.
The attachment drops unnecessary extensions index
and
the attachment drops duplicate reports index
However, it looks like there may be more that are unused after running:
select * from pg_stat_user_indexes where relname like 'reports%' and idx_scan=0 and idx_tup_read=0 and idx_tup_fetch=0;
I will remove them and add the info that was removed.
Comment 11•14 years ago
|
||
alright, the indexes from the attachment csv file of unused indexes have been removed
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 12•14 years ago
|
||
Um, you didn't remove the additional indexes you mention above, did you?
There's reasons for indexes to have a fetch count of 0 but still be necessary.
| Reporter | ||
Comment 13•14 years ago
|
||
Also, the scripts were already run on production for 1.7.8. See the bug this bug is a tracker of. This just means that mpressman running the scripts again was a no-op.
| Reporter | ||
Comment 14•14 years ago
|
||
Reopening since this is a *tracker* bug.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•13 years ago
|
Component: Socorro → General
Product: Webtools → Socorro
Comment 15•13 years ago
|
||
Comment 16•12 years ago
|
||
Assigning this to Laura, as the blocker bug is hers, and likely both these bugs are long done by now and can be closed.
Assignee: mpressman → laura
Comment 17•12 years ago
|
||
untargeting. can this be closed?
Flags: needinfo?(laura)
Target Milestone: 2.0 → ---
Comment 18•12 years ago
|
||
ping. laura?
| Assignee | ||
Comment 19•11 years ago
|
||
I'm ok with this being closed.
Status: REOPENED → RESOLVED
Closed: 14 years ago → 11 years ago
Flags: needinfo?(laura)
Resolution: --- → FIXED
Updated•10 years ago
|
Flags: needinfo?(laura)
You need to log in
before you can comment on or make changes to this bug.
Description
•