-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.6.1
-
Component/s: Performance
-
None
-
Query Execution
We treat BSON as having unique keys for all values.
When searching for matching documents we use an early exit strategy, as soon as we find the value or values we are looking for we skip to the next document.
However this only benefits us in a count - anything that does a projection, including aggregation does not take advantage of this and therefore processes, and more importantly pages in more data than is required. With the removal of covered indexes for aggregation this becomes more important.
I suggest, when projecting, once we have the data we need we do not page the rest of the document in.
- is related to
-
SERVER-3334 Stop processing bson fields in projection.transform after projections met (esp. _id)
- Backlog