Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-65847

Construct simpler parameterized SBE index scan plans when possible

    • Fully Compatible
    • v6.0
    • QE 2022-05-02, QE 2022-05-16
    • 120

      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.

            Assignee:
            denis.grebennicov@mongodb.com Denis Grebennicov
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: