[SERVER-62815] ProvidedSortSet in EqLookupNode is not optimal. Created: 20/Jan/22 Updated: 06/Dec/22 Resolved: 21/Sep/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Anna Wawrzyniak | Assignee: | Backlog - Query Execution |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | pm2697-m4, sbe | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Execution
|
||||||||
| Participants: | |||||||||
| Description |
|
EqLookupNode::providedSorts() method return a conservative empty ProvidedSortSet. This may be inefficient and if used in translation, may introduce unnecessary sort stage, when underlying plan was already sorted. The EqLookupNode may provide sort order identical or similar to child sort order, depending on "joinField". If "joinField" is disjoint from the sort order, then EqLookupNode will retain it. However, if "joinField" is of of the fields in the underlying sort order, then we can only keep the sort prefix up to, but without "joinField". |