[SERVER-65847] Construct simpler parameterized SBE index scan plans when possible Created: 20/Apr/22 Updated: 29/Oct/23 Resolved: 09/May/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Query Planning |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0-rc5, 6.1.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | Denis Grebennicov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Backport Requested: |
v6.0
|
||||||||||||||||
| Sprint: | QE 2022-05-02, QE 2022-05-16 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 120 | ||||||||||||||||
| Description |
|
When a query gets auto-parameterized and an index scan plan is built by the QueryPlanner, the SBE stage builder has to convert this into an SBE plan that will work for all possible values of the input parameters. This entails a fair amount of complexity and requires us to build a larger SBE plan. In particular, we currently always construct a plan with a branch stage. One of the branches uses the fully generic recursive index scan algorithm, and the other just scans a range of index intervals known up front. For certain simple parameterized queries (e.g. if the bounds are based on a single equality predicate and will always be point bounds), we can avoid constructing this complicated branch plan and still be fully correct for all possible parameter values. This enhancement should show up as a performance improvement in some of our microbenchmarks. |
| Comments |
| Comment by Githook User [ 09/May/22 ] |
|
Author: {'name': 'Denis Grebennicov', 'email': 'denis.grebennicov@mongodb.com', 'username': 'denis631'}Message: |
| Comment by Githook User [ 06/May/22 ] |
|
Author: {'name': 'Denis Grebennicov', 'email': 'denis.grebennicov@mongodb.com', 'username': 'denis631'}Message: |