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

Experiment: Use ABT lowering in the SBE stage builders to produce more efficient plans

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Query Execution
    • Labels:
    • QE 2022-07-11, QE 2022-07-25, QE 2022-08-08, QE 2022-08-22

      We have observed that the way we translate certain MQL constructs to SBE in the SBE stage builders can be inefficient. ABT lowering will do things fundamentally differently in that it produces plans with traverse expressions rather than traverse plan stages. These expressions will compile to bytecode and be executed by the VM which has the potential to be faster than executing a complex tree of sbe::PlanStage objects.

      As an experiment, we should try using the ABT lowering code from the Bonsai optimizer POC to build SBE plans. We can start with MatchExpressions: convert MatchExpression to ABT, then convert the ABT to an EExpression which can compile to bytecode. It would also be interesting to do the same thing for projections, especially simple inclusion/exclusion projections which are common for find commands.

        1. abtmulticomponent.svg
          104 kB
        2. abtsinglecomponent.svg
          117 kB
        3. classicmulticomponent.svg
          113 kB
        4. classicsinglecomponent.svg
          116 kB

            Assignee:
            mihai.andrei@mongodb.com Mihai Andrei
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: