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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: