Indexing & Query Optimizer with Mongo
Notes on "Indexing & Query Optimizer" presentation at Mongo SF
- find({x:{$gte:3,$lte:5})
- find({ x:/^a/}) works with index but not find({x:/a/}) - because of relying on lexical ordering
- range scan key has to be the last in an index
- db.c.update( {x:2}, {$inc:{x:3}}) with index x, will still work, but will not be performant
- find({x:{$exists:true}}) - exists doesn't currently use indexes