Details
-
Improvement
-
Resolution: Fixed
-
Major - P3
-
None
-
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
Description
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
Attachments
Issue Links
- depends on
-
SERVER-70637 [CQF] Implement sorted merge physical node
-
- Closed
-