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

In classic_runtime_planner_for_sbe::CachedPlanner implement replanning for find queries

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2024-02-19, QO 2024-03-04, QO 2024-03-18
    • 2

      Implement basic replanning algorithm:

      When SBE plan is retrieved from cache, it will go through SBE trial run phase for us to see if replanning is needed.

      Classic runtime planner tracks the number of “works” to determine a budget, but SBE tracks “reads” instead of “works”. Total number of reads, performed by a plan is equal to totalKeysExamined + totalDocsExamined stats.

      SBE trial run uses TrialRunTracker to track the number of reads and, optionally, a number of documents that have reached a blocking stage.

      We will set read budget for the plan to M * (totalKeysExamined + totalDocsExamined) of the winning plan after the multi-planning, where M is internalQueryCacheEvictionRatio.

      We will not track the number of documents that have reached a blocking stage, which is consistent with classic runtime planner behavior.

            Assignee:
            chii.huang@mongodb.com Chi-I Huang
            Reporter:
            ivan.fefer@mongodb.com Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: