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

In classic_runtime_planner_for_sbe::CachedPlanner implement replanning for find queries

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Execution
    • 2

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: