Prevent bad query plans from being cached by adding additional safeguards

XMLWordPrintableJSON

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

      The query optimizer has always had a feature where if we use a cached plan for a query and we reach an nscanned that is 10x the nscanned that was recorded when the query plan was saved in the cache, then we attempt using other query plans as well. But this check is only triggered if a high nscanned is observed before 101 matches are found. After 101 matches are found, we're stuck using the cached plan only.

      We should add additional checks (eg, deviation from avg run time or total nscanned) to guard against keeping bad plans.

            Assignee:
            David Storch
            Reporter:
            Daniel Pasette (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: