-
Type:
Improvement
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Covered indexes work with straight cursor reads, but not in memory sorts. However, explain output incorrectly states that the queries are 'indexOnly'.
> c.find( {}, {_id:0,b:1} ).hint( {a:1,b:1} ).sort( {b:1} ).explain()
{
"cursor" : "BtreeCursor a_1_b_1",
"nscanned" : 0,
"nscannedObjects" : 0,
"n" : 0,
"scanAndOrder" : true,
"millis" : 1,
"nYields" : 0,
"nChunkSkips" : 0,
"isMultiKey" : false,
"indexOnly" : true,
"indexBounds" : {
"a" : [
[
{
"$minElement" : 1
},
{
"$maxElement" : 1
}
]
],
"b" : [
[
{
"$minElement" : 1
},
{
"$maxElement" : 1
}
]
]
},
"server" : "Aaron-Staples-MacBook-Pro.local:27017"
}
- is duplicated by
-
SERVER-15221 Planner sort analysis should not add FETCH stage if sort key included in index key pattern
-
- Closed
-
- is related to
-
SERVER-4161 nscannedObjects is not calculated properly for covered index queries
-
- Closed
-
-
SERVER-5759 indexOnly in explain() is not reported correctly
-
- Closed
-