In your use case, I would say this, in my experience: I hacked some analytics into my database, which made a lot of $in queries with thousands of identifiers, and it worked fine (it was a hack). To my surprise, it worked pretty well, at the bottom of the millisecond.
Of course, it is difficult to compare this, and, as is the usual theory, a poor companion when it comes to performance. I think the best way to understand this is to transfer some test data and send some requests to the system.
Use the excellent MongoDB built-in profiler, use $explain , save one pointer to the query rule, look at the logs, follow the mongostat and do some tests. This should not take too much time and give you a definite and affirmative answer. If your queries turn out to be slow, the people here and in the newsgroup probably have some ideas on how to improve the exact query or indexing.
source share