Serialize multiplanning for the same query shape

XMLWordPrintableJSON

    • Query Optimization
    • Fully Compatible
    • CAR Team 2024-03-04, CAR Team 2024-03-18, CAR Team 2024-04-01, QE 2024-05-13, QE 2024-05-27, QE 2024-06-10, QE 2024-06-24, QE 2024-07-08, QE 2024-07-22, QE 2024-08-05
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We have observed a pattern (called "multi-plan storms") whereby many concurrent operations may engage in multi-planning for the same problematic query shape. Today it is possible that the sheer magnitude of work done as part of multi-planning these queries prevents the query subsystem from completing any of those plans, caching the winning plan, and speeding up future attempts to plan. This ticket covers introducing a serialization point in the multi-planner, loosely following pseudocode algorithm:

      • Ask plan cache for plan given shape
      • If “no plan available”, plan and put plan in cache
      • Else if “someone is planning that shape already” then “wait for plan on that shape”
      • Run

       

              Assignee:
              Alexander Ignatyev
              Reporter:
              Matt Broadstone
              Votes:
              2 Vote for this issue
              Watchers:
              40 Start watching this issue

                Created:
                Updated:
                Resolved: