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

Construct simpler parameterized SBE index scan plans when possible

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 6.0.0-rc5, 6.1.0-rc0
    • Query Planning
    • None
    • Fully Compatible
    • v6.0
    • QE 2022-05-02, QE 2022-05-16
    • 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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: