mongo-hacker
mongo-hacker copied to clipboard
No index used message
The "no index used" message should only be emitted if the query took a non-trivial amount of time. I have some smaller collections where queries take a fraction of a second so an index not being used is irrelevant.
OK good idea. Maybe only if it is slower than slowms. However I do like seeing which index was used as it may yield some surprises.
Yes, I agree. I used to disable the notablescan flag on development to allow me to use shell to run any query without indexes, and it could produce mistakes if you are going to use these queries in production. Then it is still very informative for me, even for fast queries.
Potentially then the configurable should have three values: never show the index message, always show the index message and 'auto' (only show if longer than slowms)
That sounds even better!
Yeah, that sounds like a good idea.