mongo-hacker icon indicating copy to clipboard operation
mongo-hacker copied to clipboard

No index used message

Open rogerbinns opened this issue 13 years ago • 5 comments

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.

rogerbinns avatar Sep 10 '12 20:09 rogerbinns

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.

TylerBrock avatar Sep 10 '12 21:09 TylerBrock

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.

lardissone avatar Sep 29 '12 21:09 lardissone

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)

rogerbinns avatar Sep 29 '12 21:09 rogerbinns

That sounds even better!

lardissone avatar Sep 29 '12 22:09 lardissone

Yeah, that sounds like a good idea.

TylerBrock avatar Oct 01 '12 13:10 TylerBrock