@@ -72,6 +72,29 @@ The plan cache does not persist if a :binary:`~bin.mongod` restarts or shuts dow
72
72
entire plan cache. Users can also clear particular plan cache entries using
73
73
:method:`PlanCache.clearPlansByQuery()`.
74
74
75
+ Plan Cache Debug Info Size Limit
76
+ --------------------------------
77
+
78
+ Starting in 4.0.23 (and 3.6.23), the
79
+ :doc:`plan cache </core/query-plans>` will save full ``plan cache``
80
+ entries only if the cumulative size of the ``plan caches`` for all
81
+ collections is lower than 0.5 GB. When the cumulative size of the
82
+ ``plan caches`` for all collections exceeds this threshold, additional
83
+ ``plan cache`` entries are stored with stripped debug information.
84
+
85
+ When ``plan cache`` entries are stored with stripped debug information,
86
+ the :dbcommand:`planCacheListQueryShapes` command output displays an
87
+ empty document in the ``shapes`` array for each each plan cache entry for
88
+ which debug information was stripped. Similarly, detailed execution
89
+ statistics for the candidate plans are omitted from the
90
+ :dbcommand:`planCacheListPlans` command output when ``plan cache``
91
+ entries are stored with stripped debug information. When debug info is
92
+ present, you can find these detailed statistics in the ``plans.reason``
93
+ field.
94
+
95
+ The estimated size in bytes of a ``plan cache`` entry is available in
96
+ the output of :dbcommand:`planCacheListPlans`.
97
+
75
98
.. _index-filters:
76
99
77
100
Index Filters
0 commit comments