[SERVER-44432] Per index access stats Created: 15/Dec/10  Updated: 11/Dec/19  Resolved: 03/Sep/15

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 3.1.8

Type: New Feature Priority: Minor - P4
Reporter: David Mytton Assignee: James Wahlin
Resolution: Done Votes: 90
Labels: collection-level, metrics, performance, stats
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-19504 Remove indexStats command artifacts Closed
Duplicate
is duplicated by SERVER-2006 Flag unused indexes on the database s... Closed
is duplicated by SERVER-15224 Basic index stats Closed
is duplicated by SERVER-18245 Tracking of indexes being used Closed
is duplicated by SERVER-20735 Store date of last use for each index Closed
is duplicated by SERVER-4202 Add a way to get stats on number of q... Closed
is duplicated by SERVER-7318 Implement index lastUsed timestamp Closed
Related
related to SERVER-9306 Ability to temporarily forbid query o... Closed
related to DOCS-6147 Create documentation $indexStats aggr... Closed
related to SERVER-20509 Create shell helper for cluster index... Closed
related to SERVER-2178 Track stats per db/collection Closed
related to SERVER-16245 Expose index statistics for WiredTiger Closed
is related to SERVER-23655 CollectionInfoCache is not invalidate... Closed
is related to SERVER-5828 Metric/Stats Tracking Closed
Tested
Backwards Compatibility: Major Change
Sprint: Query 2.7.8, Quint Iteration 7, QuInt 8 08/28/15, Quint 9 09/18/15
Participants:

 Description   

It would be useful to be able to get stats from individual indexes about how often they are used. You can see whether a specific query uses certain indexes using explain() but this would allow you to easily see if the index is being used at all. It could just be a simple incrementing counter every time the index gets used.



 Comments   
Comment by Githook User [ 03/Sep/15 ]

Author:

{u'name': u'James Wahlin', u'email': u'james.wahlin@10gen.com'}

Message: SERVER-2227 Addition of index usage statistics
Branch: master
https://github.com/mongodb/mongo/commit/ae9df7fb11cf359686699aeb9539cb6dc35de675

Comment by Avi Vaisenberger [ 10/Jun/15 ]

+1 - Should be really really helpful and replace all the hassle going through the profiler docs

Comment by rgpublic [ 16/Sep/14 ]

"One more thing" I'd like to add: A simple counter would already be a huge step forward, but the date of last access would be even better. Otherwise one would have to compare the values of individual indexes between two dates and find out whether the counter incremented or not. Certainly not that difficult, but while you are at it you might want to consider saving the last access date as well.

Comment by Richard K. [ 16/Sep/14 ]

One more vote for this feature - we have some huge indexes it'd be great to dispose of just as soon as we're 100% sure they're completely unused.

Comment by Jeremy [ 18/Aug/14 ]

We have system that automatically creates indexes when needed-- this would be especially helpful, allowing us to auto-remove them when no longer used or when underutilized.

Comment by Nader Akhnoukh [ 18/Aug/14 ]

+1 over time the number of indexes creeps up and it would be very useful to see which are unused

Comment by Matthieu Rigal [ 22/Jul/14 ]

+1 very helpful !

Comment by Patrick Pittich-Rinnerthaler [ 16/May/14 ]

+1 This would be very useful.

Comment by Thomas DeMille [ 15/May/14 ]

index maintenance is impossible without usage stats... we probably have 50% of our indexes unused in our ad-hoc query environment. Not an issue in a system like couchbase with very easy to predict queries, but since MongoDB is so great at providing ad-hoc query performance... this is the missing link to really being world class. I have had to slow down our migration to MongoDB because of this.

Comment by Matt Wormley [ 08/May/14 ]

+1 this is missing information during performance tuning and decision making

Comment by Sam Darwin [ 23/Jan/14 ]

+1 very helpful.

Comment by Prashanth Kokati [ 11/Nov/13 ]

+1 very helpful.

Comment by Thomas DeMille [ 18/Jun/12 ]

Glad to see this, please move it up the priority! It's impossible to do a good job of indexing a DB without information on index usage.

Generated at Thu Feb 08 05:05:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.