diff --git a/source/core/query-plans.txt b/source/core/query-plans.txt index d430bc2549a..81c93eebf57 100644 --- a/source/core/query-plans.txt +++ b/source/core/query-plans.txt @@ -72,6 +72,29 @@ The plan cache does not persist if a :binary:`~bin.mongod` restarts or shuts dow entire plan cache. Users can also clear particular plan cache entries using :method:`PlanCache.clearPlansByQuery()`. +Plan Cache Debug Info Size Limit +-------------------------------- + +Starting in 3.6.23, the +:doc:`plan cache ` will save full ``plan cache`` +entries only if the cumulative size of the ``plan caches`` for all +collections is lower than 0.5 GB. When the cumulative size of the +``plan caches`` for all collections exceeds this threshold, additional +``plan cache`` entries are stored with stripped debug information. + +When ``plan cache`` entries are stored with stripped debug information, +the :dbcommand:`planCacheListQueryShapes` command output displays an +empty document in the ``shapes`` array for each each plan cache entry for +which debug information was stripped. Similarly, detailed execution +statistics for the candidate plans are omitted from the +:dbcommand:`planCacheListPlans` command output when ``plan cache`` +entries are stored with stripped debug information. When debug info is +present, you can find these detailed statistics in the ``plans.reason`` +field. + +The estimated size in bytes of a ``plan cache`` entry is available in +the output of :dbcommand:`planCacheListPlans`. + .. _index-filters: Index Filters