Each collection's query plan cache for is currently cleared after 1000 write operations are issued against the collection. This gives distribution changes a chance to affect planning decisions for query shapes that are already cached.
However, clearing the entire plan cache is aggressive, and at worst will cause deployments with a heavy write load to effectively not use the query plan cache at all.
This mechanism will be made obsolete by SERVER-15225. When SERVER-15225 is resolved, we should remove it entirely.
- depends on
-
SERVER-15225 CachedPlanStage should execute for trial period and re-plan if query performs poorly
- Closed
- related to
-
SERVER-28314 Remove unused PlanCache::_writeOperations member
- Closed