-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
When you sort by time or (meta, time) on a time-series collection, we're currently not attempting to optimize any case where the index is multikey.
Multikey indexes have more than one index entry per document, and scanning the index produces each document once, the first time it encounters one of its index entries. This means scanning a subset of the index can produce documents in a different order than scanning the whole index.
For time-series (when sorting by time or (meta, time), some cases we probably could improve are:
- When the multikey scan has no bounds.
- When the only multikey fields are irrelevant trailing fields.
- duplicates
-
SERVER-83348 Extend bounded sort optimization for timeseries for equality predicates on multi key indexes
- Backlog