-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
Fully Compatible
-
QO 2022-10-31, QO 2022-11-14, QO 2022-11-28, QO 2022-12-12, QO 2022-12-26, QO 2023-01-09, QO 2023-01-23, QO 2023-03-20, QO 2023-04-03, QO 2023-04-17
Update IntervalLowerTransport to allow sorted merge of RIDs after an index union, instead of a GroupBy.
For example:
Unique [] | projections: | rid_0 GroupBy [] | | groupings: | | RefBlock: | | Variable [rid_0] | aggregations: Union [] | | | BindBlock: | | | [rid_0] | | | Source [] | | IndexScan [{'<rid>': rid_0}, scanDefName: c1, indexDefName: index1, interval: {[Const [3], Const [3]]}] | | BindBlock: | | [rid_0] | | Source [] | IndexScan [{'<rid>': rid_0}, scanDefName: c1, indexDefName: index1, interval: {[Const [2], Const [2]]}] | BindBlock: | [rid_0] | Source [] IndexScan [{'<rid>': rid_0}, scanDefName: c1, indexDefName: index1, interval: {[Const [1], Const [1]]}] BindBlock: [rid_0] Source []
The RIDs into the groupby are going to be sorted, so sorted merge would be better
Instead of IndexScans -> Union -> GroupBy, we could have IndexScans -> SortedMerge -> Unique
- depends on
-
SERVER-70637 [CQF] Implement sorted merge physical node
- Closed