@@ -129,6 +129,7 @@ document similar to the following:
129
129
...
130
130
],
131
131
"indexFilterSet" : <boolean>,
132
+ "estimatedSizeBytes" : <num>, // Available starting in MongoDB 4.4.3, 4.2.12, 4.0.23, 3.6.23
132
133
"host" : <string>, // Available starting in MongoDB 4.4
133
134
"shard" : <string> // Available starting in MongoDB 4.4 if run on sharded cluster
134
135
}
@@ -189,9 +190,11 @@ including:
189
190
currently available indexes for that shape. For more information, see
190
191
:data:`explain.queryPlanner.planCacheKey`
191
192
192
- * - `` cachedPlan` `
193
+ * - :ref:` cachedPlan <plancachestats-cachedPlan> `
193
194
194
- - The details of the cached plan. See :data:`explain.queryPlanner`.
195
+ - .. _plancachestats-cachedPlan:
196
+
197
+ The details of the cached plan. See :data:`explain.queryPlanner`.
195
198
196
199
* - ``works``
197
200
@@ -203,24 +206,36 @@ including:
203
206
* - ``timeOfCreation``
204
207
- Time of creation for the entry.
205
208
206
- * - ``creationExecStats``
209
+ * - :ref:`creationExecStats <plancachestats-creationExecStats>`
210
+
211
+ - .. _plancachestats-creationExecStats:
207
212
208
- - An array of execution stats documents. The array contains a
213
+ An array of execution stats documents. The array contains a
209
214
document for each candidate plan.
210
215
211
216
For details on the execution stats, see
212
217
:data:`explain.executionStats`.
213
218
214
- * - ``candidatePlanScores``
219
+ * - :ref:`candidatePlanScores <plancachestats-candidatePlanScores>`
220
+
221
+ - .. _plancachestats-candidatePlanScores:
215
222
216
- - An array of scores for the candidate plans listed in the
223
+ An array of scores for the candidate plans listed in the
217
224
``creationExecStats`` array.
218
225
219
226
* - ``indexFilterSet``
220
227
221
228
- A boolean that indicates whether the an :ref:`index filter
222
229
<index-filters>` exists for the query shape.
223
230
231
+ * - ``estimatedSizeBytes``
232
+
233
+ - A number that describes the estimated size in bytes of a plan
234
+ cache entry.
235
+
236
+ .. versionadded:: 4.4.3 (*Also available starting in 4.2.12,
237
+ 4.0.23, and 3.6.23*)
238
+
224
239
* - :ref:`host <plancachestats-host>`
225
240
226
241
- .. _plancachestats-host:
@@ -330,6 +345,7 @@ The operation returns all entries in the cache:
330
345
1.5002
331
346
],
332
347
"indexFilterSet" : false,
348
+ "estimatedSizeBytes" : NumberLong(3160), // Available starting in MongoDB 4.4.3, 4.2.12, 4.0.23, 3.6.23
333
349
"host" : "mongodb1.example.net:27018", // Available starting in MongoDB 4.4
334
350
"shard" : "shardA" // Available starting in MongoDB 4.4 if run on sharded cluster
335
351
}
@@ -360,6 +376,7 @@ The operation returns all entries in the cache:
360
376
1.0002
361
377
],
362
378
"indexFilterSet" : false,
379
+ "estimatedSizeBytes" : NumberLong(2539), // Available starting in MongoDB 4.4.3, 4.2.12, 4.0.23, 3.6.23
363
380
"host" : "mongodb1.example.net:27018", // Available starting in MongoDB 4.4
364
381
"shard" : "shardA" // Available starting in MongoDB 4.4 if run on sharded cluster
365
382
}
@@ -390,6 +407,7 @@ The operation returns all entries in the cache:
390
407
1.7502
391
408
],
392
409
"indexFilterSet" : false,
410
+ "estimatedSizeBytes" : NumberLong(3183), // Available starting in MongoDB 4.4.3, 4.2.12, 4.0.23, 3.6.23
393
411
"host" : "mongodb1.example.net:27018", // Available starting in MongoDB 4.4
394
412
"shard" : "shardA" // Available starting in MongoDB 4.4 if run on sharded cluster
395
413
}
@@ -424,6 +442,7 @@ The operation returns all entries in the cache:
424
442
1.6668666666666665
425
443
],
426
444
"indexFilterSet" : false,
445
+ "estimatedSizeBytes" : NumberLong(4653), // Available starting in MongoDB 4.4.3, 4.2.12, 4.0.23, 3.6.23
427
446
"host" : "mongodb1.example.net:27018", // Available starting in MongoDB 4.4
428
447
"shard" : "shardA" // Available starting in MongoDB 4.4 if run on sharded cluster
429
448
}
@@ -476,7 +495,7 @@ specific information for a particular query shape:
476
495
477
496
.. code-block:: javascript
478
497
479
- db.orders.aggregate( [
498
+ db.orders.aggregate( [
480
499
{ $planCacheStats: { } },
481
500
{ $match: { planCacheKey: "DD67E353"} }
482
501
] )
@@ -485,7 +504,7 @@ The operation returns the following:
485
504
486
505
.. code-block:: javascript
487
506
:copyable: false
488
-
507
+
489
508
{
490
509
"createdFromQuery" : {
491
510
"query" : { "quantity" : { "$gte" : 5 }, "type" : "apparel" },
@@ -651,6 +670,7 @@ The operation returns the following:
651
670
1.5002
652
671
],
653
672
"indexFilterSet" : false,
673
+ "estimatedSizeBytes" : NumberLong(3160), // Available starting in MongoDB 4.4.3, 4.2.12, 4.0.23, 3.6.23
654
674
"host" : "mongodb1.example.net:27018", // Available starting in MongoDB 4.4
655
675
"shard" : "shardA" // Available starting in MongoDB 4.4 if run on sharded cluster
656
676
}
0 commit comments