Closed Bug 634722 Opened 14 years ago Closed 11 years ago

Perform index audit on reports table [tracker]

Categories

(Socorro :: General, task)

x86
macOS
task
Not set
normal

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?
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.
actually: reports_*_unique_uuid should be retained, and the duplicate index reports_*_uuid_key, which is not unique, should be dropped. Patches to come.
Drop indexes script
That takes care of dropping indexes. Adding needed indexes is more complicated, and should be tackled after the all-hands.
Target Milestone: 1.7.8 → 2.0
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]
Blocks: 659849
Blocks: 659850
Assignee: josh → mpressman
mpressman, status?
unnecessary and duplicate indexes have been removed
Can we close this out then? Also, can you give us a quick summary of work done? (ie what did we get rid of?)
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.
alright, the indexes from the attachment csv file of unused indexes have been removed
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
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.
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.
Reopening since this is a *tracker* bug.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Component: Socorro → General
Product: Webtools → Socorro
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
untargeting. can this be closed?
Flags: needinfo?(laura)
Target Milestone: 2.0 → ---
ping. laura?
I'm ok with this being closed.
Status: REOPENED → RESOLVED
Closed: 14 years ago11 years ago
Flags: needinfo?(laura)
Resolution: --- → FIXED
Flags: needinfo?(laura)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: