-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
This has come up a few times recently - when we scan and order a doc we always load the full doc rather than sorting based on index keys when possible. There may be some concurrency related issues to deal with if we want to change this behavior, since I believe right now the full doc is kept in the result set and never re-read. One thing we could probably do pretty easily is check if a doc will fit within the sort limit (at the current point of an index scan) using index keys and then only load the doc if it does in fact look like it will fit.
- is duplicated by
-
SERVER-15221 Planner sort analysis should not add FETCH stage if sort key included in index key pattern
- Closed