-
Type: Improvement
-
Resolution: Duplicate
-
Priority: 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.
- duplicates
-
SERVER-15225 CachedPlanStage should execute for trial period and re-plan if query performs poorly
- Closed
- related to
-
SERVER-13675 Plans with differing performance can tie during plan ranking
- Closed