Answer the question
In order to leave comments, you need to log in
How to execute query faster in MongoDb?
Hello.
There are 27 million documents in the db.users collection and I'm interested in selecting one array field (1 nesting level).
Can you please tell me how to determine the query execution time: db.users.find({"cred.0.shortnumber" : "123"})?
Which index will help you complete the query as quickly as possible? Now launched db.userscreateIndex({"cred.0.shortnumber" : 1}), and something hangs for an hour, and it is not known whether it will be faster than the very first request? =)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question