File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -451,9 +451,17 @@ execution of the winning plan. In order to include
451
451
.. data:: explain.executionStats.executionTimeMillis
452
452
453
453
Total time in milliseconds required for query plan selection and
454
- query execution. :data:`~explain.executionStats.executionTimeMillis` corresponds
455
- to the ``millis`` field returned by ``cursor.explain()`` in
456
- earlier versions of MongoDB.
454
+ query execution. It includes the time it takes to run the trial phase
455
+ part of the plan selection process, but does not include the network time
456
+ to transmit the data back to the client.
457
+
458
+ The time reported by ``explain.executionStats.executionTimeMillis`` is
459
+ not necessarily representative of actual query time. During steady
460
+ state operations (when the query plan is cached), or when using
461
+ :method:`cursor.hint()` with ``cursor.explain()``, MongoDB bypasses the
462
+ plan selection process, resulting in a faster actual time, leading to
463
+ a lower ``explain.executionStats.executionTimeMillis`` value.
464
+
457
465
458
466
.. data:: explain.executionStats.totalKeysExamined
459
467
You can’t perform that action at this time.
0 commit comments