Optimize how we build the DebugInfo for plan cache

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • QO 2022-03-07, QO 2022-03-21
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We used to build DebugInfo in the callback function when we are to create a new Entry in the plan cache. After some refactoring in SERVER-59682 we are now constantly building DebugInfo before we are sure to create a new Entry to store in the plan cache. This change caused regression especially when the incoming queries share a same query shape.

      This construction of a DebugInfo can be avoided if there already exists a same entry in the cache. Consider fallback to use a callback function to build the DebugInfo rather than construct it upfront.

            Assignee:
            Ruoxin Xu (Inactive)
            Reporter:
            Ruoxin Xu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: