is there a way to find queries in mongodb that are not using Indexes or are SLOW? In MySQL that is possible with the following settings inside configuration file:
In case somebody ends up here from Google on this old question, I found that explain
really helped me fix specific queries that I could see were causing COLLSCAN
s from the logs.
Example:
db.collection.find().explain()
This will let you know if the query is using a COLLSCAN
(Basic Cursor) or an index
(BTree), among other things.
https://docs.mongodb.com/manual/reference/method/cursor.explain/