-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
Affects Version/s: mongodb-3.2
-
Component/s: manual
-
Labels:None
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.