@@ -535,6 +535,25 @@ operation.
535535
536536 Number of bytes read by the operation from the disk to the cache.
537537
538+ Data read from disk into the cache includes everything needed
539+ to execute the query. If the data is already in the cache,
540+ then the number of bytes read from disk could be ``0``.
541+
542+ The number of bytes read from disk includes more than the
543+ queried documents:
544+
545+ * WiredTiger reads in units of pages and a page may contain one or
546+ several documents. If a document is in a page, all documents in that
547+ page are read into the cache and included in the ``bytesRead`` value.
548+
549+ * If the cache requires page management (such as eviction or rereads),
550+ the ``bytesRead`` value includes data read from disk
551+ in these operations.
552+
553+ * If the index is not in the cache or the index in the cache is stale,
554+ WiredTiger reads several internal and leaf pages from disk to
555+ reconstruct the index in cache.
556+
538557 .. data:: system.profile.storage.data.timeReadingMicros
539558
540559 .. versionadded:: 4.2 (*Also available starting in 4.0.9*)
@@ -549,6 +568,17 @@ operation.
549568 Number of bytes written by the operation from the cache to the
550569 disk.
551570
571+ WiredTiger typically doesn't require the query to write to disk.
572+ Data modified by the query is written to an in-memory cache that
573+ WiredTiger flushes to disk as part an eviction or checkpoint
574+ operation. In such cases, ``bytesWritten`` shows as 0.
575+
576+ If the thread running the query requires forced page management
577+ (such as eviction), WiredTiger writes the page contents to disk.
578+ This flush likely includes data unrelated to changes made by the
579+ query itself, which can cause ``bytesWritten`` to show
580+ a higher value than expected.
581+
552582 .. data:: system.profile.storage.data.timeWritingMicros
553583
554584 .. versionadded:: 4.2 (*Also available starting in 4.0.9*)
0 commit comments