Details
Description
Original title: Aggregate involving Text search reported by profiler as COLLSCAN
This manifests as a non-query having the execStats of the last query.
Text search query can't possibly be a collection scan:
{
|
"op" : "command", |
"ns" : "test.$cmd", |
"command" : { |
"aggregate" : "test", |
"pipeline" : [ |
{
|
"$match" : { |
"$text" : { |
"$search" : "test" |
}
|
}
|
}
|
],
|
"cursor" : { |
|
}
|
},
|
"keyUpdates" : 0, |
"numYield" : 0, |
"lockStats" : { |
"timeLockedMicros" : { |
"r" : NumberLong(205), |
"w" : NumberLong(0) |
},
|
"timeAcquiringMicros" : { |
"r" : NumberLong(4), |
"w" : NumberLong(3) |
}
|
},
|
"responseLength" : 138, |
"millis" : 0, |
"execStats" : { |
"type" : "COLLSCAN", |
"works" : 29, |
"yields" : 0, |
"unyields" : 0, |
"invalidates" : 0, |
"advanced" : 27, |
"needTime" : 1, |
"needFetch" : 0, |
"isEOF" : 1, |
"docsTested" : 27, |
"children" : [ ] |
},
|
"ts" : ISODate("2014-03-25T20:31:12.204Z"), |
"client" : "127.0.0.1", |
"allUsers" : [ ], |
"user" : "" |
}
|