Optimizing MongoDB Compound Indexes
emptysquare.net
Optimizing MongoDB Compound Indexes
1–10 of 12 posts
Re: Optimizing MongoDB Compound Indexes
#2Re: Optimizing MongoDB Compound Indexes
#3Is MongoDB actually able to combine 2 or more indices?
Re: Optimizing MongoDB Compound Indexes
#4Is MongoDB actually able to combine 2 or more indices?
No - it can only use one for a given query. But a compound index like the ones I describe in the post can index many fields.
Re: Optimizing MongoDB Compound Indexes
#5Is MongoDB actually able to combine 2 or more indices?
https://jira.mongodb.org/browse/SERVER-3071
It's index intersection, and it's scheduled for 2.3.1 which is the next next dev release. I'm hoping it makes it in for 2.4.
Re: Optimizing MongoDB Compound Indexes
#6Re: Optimizing MongoDB Compound Indexes
#7What should be added to this is the ability to tell Mongo to return an error if your query requires a table scan. That one configuration item can be the difference between a request returning an error and a whole site going down for an extended period.
Re: Optimizing MongoDB Compound Indexes
#8What should be added to this is the ability to tell Mongo to return an error if your query requires a table scan. That one configuration item can be the difference between a request returning an error and a whole site going down for an extended period.
You can ask it to explain what it did, just like you'd ask for the last error. Then in your app enforce whatever rules related to indexes you wish.
Note that explain runs the actual query to determine the result. If the query is slow, the explain will be slow too.Re: Optimizing MongoDB Compound Indexes
#9What should be added to this is the ability to tell Mongo to return an error if your query requires a table scan. That one configuration item can be the difference between a request returning an error and a whole site going down for an extended period.
notablescan = true
http://docs.mongodb.org/manual/reference/configuration-optio...Re: Optimizing MongoDB Compound Indexes
#10What should be added to this is the ability to tell Mongo to return an error if your query requires a table scan. That one configuration item can be the difference between a request returning an error and a whole site going down for an extended period.
There is a config setting for that notablescan = true http://docs.mongodb.org/manual/reference/configuration-optio...