Regression from 2.4. Presumably never implemented for the IDHack runner?
2.4.9:
> db.foo.find({_id:1},{_id:1}).explain()
{
"cursor" : "BtreeCursor _id_",
"isMultiKey" : false,
"n" : 1,
"nscannedObjects" : 0, // zero
"nscanned" : 1,
"nscannedObjectsAllPlans" : 0,
"nscannedAllPlans" : 1,
"scanAndOrder" : false,
"indexOnly" : true,
"nYields" : 0,
"nChunkSkips" : 0,
"millis" : 0,
"indexBounds" : {
"_id" : [
[
1,
1
]
]
},
"server" : "Rassi-MacBook-Pro.local:27017"
}
2.6.0-rc0:
> db.foo.find({_id:1},{_id:1}).explain()
{
"cursor" : "IDCursor",
"n" : 1,
"nscannedObjects" : 1, // not zero
"nscanned" : 1,
"millis" : 0,
"indexBounds" : {
"_id" : [
[
1,
1
]
]
},
"server" : "Rassi-MacBook-Pro.local:27017"
}
>
- is related to
-
SERVER-14304 Equality queries on _id with projection on _id may return orphan documents on sharded collections
-
- Closed
-