-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
In classic, we have implemented streaming group (SERVER-70267), which is group id order preserving due to the conditions when a query is eligible for streaming group.
This order preserving property can benefit further stages after a streaming group, eg a sort on the same order.
Post group sort is often used with $limit/$skip to support pagination of results, for example as modelled by this workload:
Eliminating the sort would greatly improve query performance.
When SBE supports streaming group, the same post group sort eliminatino also applies.