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

Query plan cache should cache query plans that repeatedly tie with winning plan for a given shape

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None

      For a query shape that has never been run before, it is not optimal to cache a plan if it ties with another, because not enough information is available to conclusively rule out either plan. However, for a query shape that generates two plans that are guaranteed to always tie, it is useless to run a trial for those two plans on every query. A better solution is to cache an arbitrary plan after it ties N times in a row with the winning plan.

      Related: SERVER-15225.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: