[SERVER-54745] Avoid creating intermediate object in covered SBE plans Created: 24/Feb/21 Updated: 29/Oct/23 Resolved: 11/Jun/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.0-rc2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Ian Boros | Assignee: | Nikita Lapkov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | post-rc0, sbe-post-rc0 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Backport Requested: |
v5.0
|
||||||||||||||||
| Sprint: | Query Execution 2021-05-31, Query Execution 2021-06-14, Query Execution 2021-06-28 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
When an SBE plan is covered, it may "rehydrate" the index key into an object, which is then used in the rest of the plan. In some cases, the rest of the plan can use the "index key slots" (slots storing each component of the index key). This would save us the work of creating a temporary object.
A good example of this is how "default" projections are implemented. For example, a covered query like:
Using an index {{ {a.c:1, b: 1}}} will create a temporary object for each index key. The default projection could instead use the slot storing the "a.c" component directly. |
| Comments |
| Comment by Githook User [ 14/Jun/21 ] |
|
Author: {'name': 'Nikita Lapkov', 'email': 'nikita.lapkov@mongodb.com', 'username': 'laplab'}Message: (cherry picked from commit 13d2be97d1ba504057ee2cddd67c13e5bce37aa5) |
| Comment by Githook User [ 11/Jun/21 ] |
|
Author: {'name': 'Nikita Lapkov', 'email': 'nikita.lapkov@mongodb.com', 'username': 'laplab'}Message: |