Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-8151

Definition of "listQueryShapes" does not match other definitions of query caching

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • mongodb-3.2
    • manual
    • None

    Description

      The definition of the "PlanCache.listQueryShapes()" states:

      The query optimizer only caches the plans for those query shapes that can have more than one viable plan.

      Certainly, this method only returns query shapes for those queries than can use either of two indexes, (e.g. {a:1} and {a:1, b:1})

      But the definition of when query plans are cached is different in SERVER-15225, which states:

      The query optimizer caches plans for each query shape and reuses these plans for a time.

      Does the query planner cache all past query plans or only those that have two viable plan?

      I suspect that the behavior of the listQueryShapes() method is that it does not return all cache query plans.

      Attachments

        Activity

          People

            ravind.kumar Ravind Kumar (Inactive)
            steven.hand Steven Hand
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 31 weeks, 5 days ago