<section>
 <h1 class="contains-headerlink leafygreen-ui-41fr9s" weight="medium">
  $queryStats (aggregation)
  <a class="headerlink leafygreen-ui-1kepx47" href="#-querystats--aggregation-" title="Permalink to this heading">
   <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
    <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
    </path>
    <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
    </path>
   </svg>
   <div class="css-1btu0w3 evvkmar0" id="-querystats--aggregation-">
   </div>
  </a>
 </h1>
 <div class="leafygreen-ui-a5yxub">
  <p class="css-1cmx2d4 ef7gu8j0">
   On this page
  </p>
  <ul class="css-1qb0mst ef7gu8j1">
   <li class="leafygreen-ui-1e7a0ei">
    <a class="lg-ui-0001 leafygreen-ui-e98ikf" href="#definition" target="_self">
     <span>
      Definition
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-cpmeq5" href="#requirements" target="_self">
     <span>
      Requirements
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-cpmeq5" href="#syntax" target="_self">
     <span>
      Syntax
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#command-fields" target="_self">
     <span>
      Command Fields
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-cpmeq5" href="#access-control" target="_self">
     <span>
      Access Control
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-cpmeq5" href="#behavior" target="_self">
     <span>
      Behavior
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#how--querystats-tracks-query-statistics" target="_self">
     <span>
      How $queryStats Tracks Query Statistics
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#how--querystats-groups-returned-documents" target="_self">
     <span>
      How $queryStats Groups Returned Documents
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#how--querystats-transforms-data-using-transformidentifiers" target="_self">
     <span>
      How $queryStats Transforms Data Using transformIdentifiers
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#-querystats-log-entries" target="_self">
     <span>
      $queryStats Log Entries
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#change-streams" target="_self">
     <span>
      Change Streams
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-cpmeq5" href="#output" target="_self">
     <span>
      Output
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#collection-type" target="_self">
     <span>
      Collection Type
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#query-shape" target="_self">
     <span>
      Query Shape
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-cpmeq5" href="#examples" target="_self">
     <span>
      Examples
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#untransformed-example" target="_self">
     <span>
      Untransformed Example
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#transformed-example" target="_self">
     <span>
      Transformed Example
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-cpmeq5" href="#mongodb-atlas-data-collection" target="_self">
     <span>
      MongoDB Atlas Data Collection
     </span>
    </a>
   </li>
  </ul>
 </div>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Definition
   <a class="headerlink leafygreen-ui-1kepx47" href="#definition" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="definition">
    </div>
   </a>
  </h2>
  <dl class="pipeline">
   <dt>
    <code class="leafygreen-ui-1l06pbn">
     $queryStats
    </code>
    <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-pipeline-pipe.-queryStats" title="Permalink to this definition">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="mongodb-pipeline-pipe.-queryStats">
     </div>
    </a>
   </dt>
   <dd>
   </dd>
  </dl>
  <div class="leafygreen-ui-1sjx7ru" role="note">
   <h2 class="leafygreen-ui-29m78u">
    Warning
   </h2>
   <div class="leafygreen-ui-9mycqc">
    <p class="leafygreen-ui-1kp3ins">
     The
     <code class="leafygreen-ui-1l06pbn">
      $queryStats
     </code>
     aggregation stage is unsupported and is not
guaranteed to be stable in a future release. Don't build
functionality that relies on a specific output format of this stage,
since the output may change in a future release.
    </p>
   </div>
  </div>
  <p class="leafygreen-ui-1kp3ins">
   Returns runtime statistics for recorded queries.
  </p>
  <p class="leafygreen-ui-1kp3ins">
   <code class="leafygreen-ui-1l06pbn">
    $queryStats
   </code>
   collects and reports metrics for
   <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/db.collection.aggregate/#mongodb-method-db.collection.aggregate">
    <code class="leafygreen-ui-1l06pbn">
     aggregate()
    </code>
   </a>
   ,
   <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/db.collection.find/#mongodb-method-db.collection.find">
    <code class="leafygreen-ui-1l06pbn">
     find()
    </code>
   </a>
   ,
and
   <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/db.collection.distinct/#mongodb-method-db.collection.distinct">
    <code class="leafygreen-ui-1l06pbn">
     distinct()
    </code>
   </a>
   queries.
   <code class="leafygreen-ui-1l06pbn">
    $queryStats
   </code>
   does
not collect information for queries that use
   <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/queryable-encryption/#std-label-qe-manual-feature-qe">
    Queryable Encryption
    <!-- -->
    .
   </a>
  </p>
 </section>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Requirements
   <a class="headerlink leafygreen-ui-1kepx47" href="#requirements" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="requirements">
    </div>
   </a>
  </h2>
  <p class="leafygreen-ui-1kp3ins">
   The
   <code class="leafygreen-ui-1l06pbn">
    $queryStats
   </code>
   stage is enabled on deployments hosted on
   <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.mongodb.com/docs/atlas/" target="_self">
    <span>
     MongoDB Atlas
    </span>
   </a>
   with a cluster tier of at least M10.
  </p>
  <p class="leafygreen-ui-1kp3ins">
   To run the
   <code class="leafygreen-ui-1l06pbn">
    $queryStats
   </code>
   stage, your pipeline must meet the following
requirements:
  </p>
  <ul class="leafygreen-ui-rioki0">
   <li class="leafygreen-ui-d7p7b6">
    <p class="leafygreen-ui-1kp3ins">
     The pipeline must be run on the
     <code class="leafygreen-ui-1l06pbn">
      admin
     </code>
     database.
    </p>
   </li>
   <li class="leafygreen-ui-d7p7b6">
    <p class="leafygreen-ui-1kp3ins">
     <code class="leafygreen-ui-1l06pbn">
      $queryStats
     </code>
     must be the first stage in the pipeline.
    </p>
   </li>
  </ul>
 </section>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Syntax
   <a class="headerlink leafygreen-ui-1kepx47" href="#syntax" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="syntax">
    </div>
   </a>
  </h2>
  <script class="structured_data" type="application/ld+json">
   {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"db.adminCommand( {\n   aggregate: 1,\n   pipeline: [\n      {\n         $queryStats: {\n            transformIdentifiers: {\n               algorithm: &lt;string&gt;,\n               hmacKey: &lt;bindata&gt; /* subtype 8 - used for sensitive data */\n            }\n         }\n      }\n   ],\n   cursor: { }\n } )","programmingLanguage":"JavaScript"}
  </script>
  <div class="css-16lmvu9">
   <div class="leafygreen-ui-196mwvg">
    <div class="leafygreen-ui-1b1bvay">
     <pre class="leafygreen-ui-11itue3" tabindex="0"><code class="lg-highlight-hljs-light javascript leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">db.<span class="lg-highlight-title lg-highlight-function">adminCommand</span>( <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   <span class="lg-highlight-attr">aggregate</span>: <span class="lg-highlight-number">1</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   <span class="lg-highlight-attr">pipeline</span>: <!-- -->[</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">         <span class="lg-highlight-attr">$queryStats</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">            <span class="lg-highlight-attr">transformIdentifiers</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">               <span class="lg-highlight-attr">algorithm</span>: &lt;<!-- -->string<!-- -->&gt;<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">               <span class="lg-highlight-attr">hmacKey</span>: &lt;<!-- -->binData<!-- -->&gt; <span class="lg-highlight-comment">/* subtype 8 -</span><span class="lg-highlight-comment"> used for sensitive </span><span class="lg-highlight-comment">data */</span></td></tr><tr class=""><td class="leafygreen-ui-7razhx">            <!-- -->}</td></tr><tr class=""><td class="leafygreen-ui-7razhx">         }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   ]<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   <span class="lg-highlight-attr">cursor</span>: <!-- -->{ <!-- -->}</td></tr><tr class=""><td class="leafygreen-ui-7razhx"> } )</td></tr></tbody></table></code></pre>
     <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
      <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
       <div class="leafygreen-ui-xhlipt">
        <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
         <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
         </path>
        </svg>
       </div>
      </button>
     </div>
    </div>
   </div>
  </div>
  <div class="leafygreen-ui-85da11" role="note">
   <h2 class="leafygreen-ui-1ac4g5h">
    Important
   </h2>
   <div class="leafygreen-ui-9mycqc">
    <p class="leafygreen-ui-1kp3ins">
     You cannot run
     <code class="leafygreen-ui-1l06pbn">
      $queryStats
     </code>
     on a specific collection. For complete
examples, see
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-queryStats-examples" target="_self">
      <span>
       Examples
       <!-- -->
       .
      </span>
     </a>
    </p>
   </div>
  </div>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Command Fields
    <a class="headerlink leafygreen-ui-1kepx47" href="#command-fields" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="command-fields">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    <code class="leafygreen-ui-1l06pbn">
     $queryStats
    </code>
    takes the following fields:
   </p>
   <div class="leafygreen-ui-skkc39" tabindex="0">
    <table class="leafygreen-ui-hr8lsv">
     <colgroup>
      <col style="width:10%"/>
      <col style="width:10%"/>
      <col style="width:10%"/>
      <col style="width:20%"/>
     </colgroup>
     <thead class="leafygreen-ui-a9ho40">
      <tr data-testid="leafygreen-ui-header-row">
       <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
        <div class="leafygreen-ui-ui0te9">
         <div>
          Field
         </div>
        </div>
       </th>
       <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
        <div class="leafygreen-ui-ui0te9">
         <div>
          Necessity
         </div>
        </div>
       </th>
       <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
        <div class="leafygreen-ui-ui0te9">
         <div>
          Type
         </div>
        </div>
       </th>
       <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
        <div class="leafygreen-ui-ui0te9">
         <div>
          Description
         </div>
        </div>
       </th>
      </tr>
     </thead>
     <tbody>
      <tr class="">
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          <code class="leafygreen-ui-1l06pbn">
           transformIdentifiers
          </code>
         </div>
        </div>
       </td>
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          Optional
         </div>
        </div>
       </td>
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          Document
         </div>
        </div>
       </td>
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          Specifies additional transformation options for the
          <code class="leafygreen-ui-1l06pbn">
           $queryStats
          </code>
          output.
         </div>
        </div>
       </td>
      </tr>
      <tr class="">
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          <div class="line-block">
           <div class="line">
            <code class="leafygreen-ui-1l06pbn">
             transformIdentifiers
            </code>
           </div>
           <div class="line">
            <code class="leafygreen-ui-1l06pbn">
             .algorithm
            </code>
           </div>
          </div>
         </div>
        </div>
       </td>
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          Required if specifying the
          <code class="leafygreen-ui-1l06pbn">
           transformIdentifiers
          </code>
          object
         </div>
        </div>
       </td>
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          String
         </div>
        </div>
       </td>
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          The type of hash transformation applied to namespace information
and field names in output. The only currently supported
          <code class="leafygreen-ui-1l06pbn">
           algorithm
          </code>
          value is
          <code class="leafygreen-ui-1l06pbn">
           hmac-sha-256
          </code>
          .
         </div>
        </div>
       </td>
      </tr>
      <tr class="">
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          <div class="line-block">
           <div class="line">
            <code class="leafygreen-ui-1l06pbn">
             transformIdentifiers
            </code>
           </div>
           <div class="line">
            <code class="leafygreen-ui-1l06pbn">
             .hmacKey
            </code>
           </div>
          </div>
         </div>
        </div>
       </td>
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          Required if specifying the
          <code class="leafygreen-ui-1l06pbn">
           transformIdentifiers
          </code>
          object
         </div>
        </div>
       </td>
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          binData
         </div>
        </div>
       </td>
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          The private key input in the HMAC transformation.
         </div>
        </div>
       </td>
      </tr>
     </tbody>
    </table>
   </div>
  </section>
 </section>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Access Control
   <a class="headerlink leafygreen-ui-1kepx47" href="#access-control" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="access-control">
    </div>
   </a>
  </h2>
  <p class="leafygreen-ui-1kp3ins">
   If your deployment enforces access control, the user running
   <code class="leafygreen-ui-1l06pbn">
    $queryStats
   </code>
   must have the following permissions:
  </p>
  <ul class="leafygreen-ui-rioki0">
   <li class="leafygreen-ui-d7p7b6">
    <p class="leafygreen-ui-1kp3ins">
     To run
     <code class="leafygreen-ui-1l06pbn">
      $queryStats
     </code>
     without the
     <code class="leafygreen-ui-1l06pbn">
      transformIdentifiers
     </code>
     option,
the user must have the
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/privilege-actions/#mongodb-authaction-queryStatsRead">
      <code class="leafygreen-ui-1l06pbn">
       queryStatsRead
      </code>
     </a>
     privilege action.
    </p>
   </li>
   <li class="leafygreen-ui-d7p7b6">
    <p class="leafygreen-ui-1kp3ins">
     To run
     <code class="leafygreen-ui-1l06pbn">
      $queryStats
     </code>
     with the
     <code class="leafygreen-ui-1l06pbn">
      transformIdentifiers
     </code>
     option, the
user must have the both the
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/privilege-actions/#mongodb-authaction-queryStatsRead">
      <code class="leafygreen-ui-1l06pbn">
       queryStatsRead
      </code>
     </a>
     and
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/privilege-actions/#mongodb-authaction-queryStatsReadTransformed">
      <code class="leafygreen-ui-1l06pbn">
       queryStatsReadTransformed
      </code>
     </a>
     privilege actions.
    </p>
   </li>
  </ul>
  <p class="leafygreen-ui-1kp3ins">
   The built-in
   <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/built-in-roles/#mongodb-authrole-clusterMonitor">
    <code class="leafygreen-ui-1l06pbn">
     clusterMonitor
    </code>
   </a>
   role provides the
   <code class="leafygreen-ui-1l06pbn">
    queryStatsRead
   </code>
   and
   <code class="leafygreen-ui-1l06pbn">
    queryStatsReadTransformed
   </code>
   privileges. The
following example grants the
   <code class="leafygreen-ui-1l06pbn">
    clusterMonitor
   </code>
   role on the
   <code class="leafygreen-ui-1l06pbn">
    admin
   </code>
   database:
  </p>
  <script class="structured_data" type="application/ld+json">
   {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"db.grantRolesToUser(\n   \"&lt;user&gt;\",\n   [ { role: \"clusterMonitor\", db: \"admin\" } ]\n)","programmingLanguage":"JavaScript"}
  </script>
  <div class="css-16lmvu9">
   <div class="leafygreen-ui-196mwvg">
    <div class="leafygreen-ui-yzcs8i">
     <pre class="leafygreen-ui-11itue3" tabindex="-1"><code class="lg-highlight-hljs-light javascript leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">db.<span class="lg-highlight-title lg-highlight-function">grantRolesToUser</span>(</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   <span class="lg-highlight-string">"&lt;user&gt;"</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   <!-- -->[ <!-- -->{ <span class="lg-highlight-attr">role</span>: <span class="lg-highlight-string">"clusterMonitor"</span>, <span class="lg-highlight-attr">db</span>: <span class="lg-highlight-string">"admin"</span> } ]</td></tr><tr class=""><td class="leafygreen-ui-7razhx">)</td></tr></tbody></table></code></pre>
     <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
      <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
       <div class="leafygreen-ui-xhlipt">
        <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
         <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
         </path>
        </svg>
       </div>
      </button>
     </div>
    </div>
   </div>
  </div>
 </section>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Behavior
   <a class="headerlink leafygreen-ui-1kepx47" href="#behavior" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="behavior">
    </div>
   </a>
  </h2>
  <p class="leafygreen-ui-1kp3ins">
   The following sections describe behavioral details of the
   <code class="leafygreen-ui-1l06pbn">
    $queryStats
   </code>
   stage.
  </p>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    How $queryStats Tracks Query Statistics
    <a class="headerlink leafygreen-ui-1kepx47" href="#how--querystats-tracks-query-statistics" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="how--querystats-tracks-query-statistics">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    Statistics for the
    <code class="leafygreen-ui-1l06pbn">
     $queryStats
    </code>
    stage are tracked in a virtual
collection that is stored in-memory. The memory limit for the virtual
collection is 1% of the system's total memory.
   </p>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    How $queryStats Groups Returned Documents
    <a class="headerlink leafygreen-ui-1kepx47" href="#how--querystats-groups-returned-documents" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="how--querystats-groups-returned-documents">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    <code class="leafygreen-ui-1l06pbn">
     $queryStats
    </code>
    groups queries with common properties into the same
output document. The resulting document is called a
    <strong>
     query stats
entry
    </strong>
    .
   </p>
   <p class="leafygreen-ui-1kp3ins">
    <code class="leafygreen-ui-1l06pbn">
     $queryStats
    </code>
    groups similar queries together by normalizing
user-provided field values to their data types. For example, a filter
specified as
    <code class="leafygreen-ui-1l06pbn">
     { item: 'card' }
    </code>
    is normalized to
    <code class="leafygreen-ui-1l06pbn">
     { item :
'?string'}
    </code>
    .
    <code class="leafygreen-ui-1l06pbn">
     $queryStats
    </code>
    also normalizes the values of some query
options like
    <code class="leafygreen-ui-1l06pbn">
     hint
    </code>
    and
    <code class="leafygreen-ui-1l06pbn">
     comment
    </code>
    .
   </p>
   <p class="leafygreen-ui-1kp3ins">
    <code class="leafygreen-ui-1l06pbn">
     $queryStats
    </code>
    preserves literal values for options like
    <code class="leafygreen-ui-1l06pbn">
     readConcern
    </code>
    and
    <code class="leafygreen-ui-1l06pbn">
     readPreference
    </code>
    .
   </p>
   <p class="leafygreen-ui-1kp3ins">
    For the complete list of options included in a query stats entry, see
    <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-queryStats-find-query-shape" target="_self">
     <span>
      find Command Query Shape
      <!-- -->
      .
     </span>
    </a>
   </p>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    How $queryStats Transforms Data Using transformIdentifiers
    <a class="headerlink leafygreen-ui-1kepx47" href="#how--querystats-transforms-data-using-transformidentifiers" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="how--querystats-transforms-data-using-transformidentifiers">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    When an HMAC key is specified to the
    <code class="leafygreen-ui-1l06pbn">
     transformIdentifiers
    </code>
    option,
    <code class="leafygreen-ui-1l06pbn">
     $queryStats
    </code>
    uses the HMAC key to apply an HMAC-SHA-256 hash function
on the following data:
   </p>
   <ul class="leafygreen-ui-rioki0">
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      Document field names
     </p>
    </li>
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      Collection names
     </p>
    </li>
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      Database names
     </p>
    </li>
   </ul>
   <p class="leafygreen-ui-1kp3ins">
    <code class="leafygreen-ui-1l06pbn">
     $queryStats
    </code>
    <strong>
     does not
    </strong>
    apply the HMAC transformation to the
following data:
   </p>
   <ul class="leafygreen-ui-rioki0">
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      MQL keywords such as operator names (for example,
      <code class="leafygreen-ui-1l06pbn">
       $gte
      </code>
      ).
     </p>
    </li>
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      Parameter names such as the
      <code class="leafygreen-ui-1l06pbn">
       partitionBy
      </code>
      parameter in
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/operator/aggregation/setWindowFields/#mongodb-pipeline-pipe.-setWindowFields">
       <code class="leafygreen-ui-1l06pbn">
        $setWindowFields
       </code>
       .
      </a>
     </p>
    </li>
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      Field values.
      <code class="leafygreen-ui-1l06pbn">
       $queryStats
      </code>
      normalizes field values in a query to
their data types (such as number or string) when the query is
recorded.
      <code class="leafygreen-ui-1l06pbn">
       $queryStats
      </code>
      never stores field values that contain user
data.
     </p>
    </li>
   </ul>
   <p class="leafygreen-ui-1kp3ins">
    For an example of transformed output, see
    <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-queryStats-example-transformed" target="_self">
     <span>
      Transformed Example
      <!-- -->
      .
     </span>
    </a>
   </p>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    $queryStats Log Entries
    <a class="headerlink leafygreen-ui-1kepx47" href="#-querystats-log-entries" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="-querystats-log-entries">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    MongoDB records
    <code class="leafygreen-ui-1l06pbn">
     $queryStats
    </code>
    operations in the
    <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.mongodb.com/docs/atlas/mongodb-logs/" target="_self">
     <span>
      deployment logs
     </span>
    </a>
    . By default, MongoDB only logs the invocation of
    <code class="leafygreen-ui-1l06pbn">
     $queryStats
    </code>
    operations, not the operation's output. For
    <code class="leafygreen-ui-1l06pbn">
     $queryStats
    </code>
    operations that include the
    <code class="leafygreen-ui-1l06pbn">
     transformIdentifiers
    </code>
    option, you can specify whether the transformed output is included in
the log entry.
   </p>
   <p class="leafygreen-ui-1kp3ins">
    To learn how to control
    <code class="leafygreen-ui-1l06pbn">
     $queryStats
    </code>
    logging behavior, see
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/operator/aggregation/queryStats/toggle-logging/#std-label-queryStats-toggle-logging">
     Toggle $queryStats Log Output
     <!-- -->
     .
    </a>
   </p>
   <span class="leafygreen-ui-1qnjd6d" id="std-label-queryStats-change-stream-behavior">
   </span>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Change Streams
    <a class="headerlink leafygreen-ui-1kepx47" href="#change-streams" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="change-streams">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    Query stats for
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/changeStreams/#std-label-changeStreams">
     change streams
    </a>
    are updated when
one of these events occur:
   </p>
   <ul class="leafygreen-ui-rioki0">
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      A cursor is created
     </p>
    </li>
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      A
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/getMore/#mongodb-dbcommand-dbcmd.getMore">
       <code class="leafygreen-ui-1l06pbn">
        getMore
       </code>
      </a>
      operation completes
     </p>
    </li>
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      A cursor closes
     </p>
    </li>
   </ul>
   <p class="leafygreen-ui-1kp3ins">
    Query stats reported for change streams have these behaviors:
   </p>
   <ul class="leafygreen-ui-rioki0">
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      Execution metrics such as
      <code class="leafygreen-ui-1l06pbn">
       totalExecMicros
      </code>
      contain information for
the most recent operation (cursor creation,
      <code class="leafygreen-ui-1l06pbn">
       getMore
      </code>
      , or cursor close).
     </p>
    </li>
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      Internal
      <code class="leafygreen-ui-1l06pbn">
       getMore
      </code>
      operations increment the
      <code class="leafygreen-ui-1l06pbn">
       execCount
      </code>
      metric.
     </p>
    </li>
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      <code class="leafygreen-ui-1l06pbn">
       firstResponseExecMicros
      </code>
      and
      <code class="leafygreen-ui-1l06pbn">
       totalExecMicros
      </code>
      are always the
same because stats are collected and updated for each
      <code class="leafygreen-ui-1l06pbn">
       getMore
      </code>
      operation.
     </p>
    </li>
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      When the cursor closes,
      <code class="leafygreen-ui-1l06pbn">
       lastExecutionMicros
      </code>
      is 0.
     </p>
    </li>
   </ul>
  </section>
 </section>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Output
   <a class="headerlink leafygreen-ui-1kepx47" href="#output" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="output">
    </div>
   </a>
  </h2>
  <p class="leafygreen-ui-1kp3ins">
   <code class="leafygreen-ui-1l06pbn">
    $queryStats
   </code>
   returns an array of query stats entries. Some query
stats entry properties contain literal values, and some properties are
normalized to group common queries.
  </p>
  <p class="leafygreen-ui-1kp3ins">
   Query stats entries contain the following top-level documents:
  </p>
  <div class="leafygreen-ui-skkc39" tabindex="0">
   <table class="leafygreen-ui-hr8lsv">
    <colgroup>
     <col style="width:10%"/>
     <col style="width:20%"/>
    </colgroup>
    <thead class="leafygreen-ui-a9ho40">
     <tr data-testid="leafygreen-ui-header-row">
      <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
       <div class="leafygreen-ui-ui0te9">
        <div>
         Document
        </div>
       </div>
      </th>
      <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
       <div class="leafygreen-ui-ui0te9">
        <div>
         Description
        </div>
       </div>
      </th>
     </tr>
    </thead>
    <tbody>
     <tr class="">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <p class="leafygreen-ui-1kp3ins">
          The unique combination of attributes that define an entry in the
query stats output. The
          <code class="leafygreen-ui-1l06pbn">
           key
          </code>
          contains attributes such as:
         </p>
         <ul class="leafygreen-ui-rioki0">
          <li class="leafygreen-ui-d7p7b6">
           <p class="leafygreen-ui-1kp3ins">
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/query-shapes/#std-label-query-shapes">
             Query shape
            </a>
           </p>
          </li>
          <li class="leafygreen-ui-d7p7b6">
           <p class="leafygreen-ui-1kp3ins">
            Client information
           </p>
          </li>
          <li class="leafygreen-ui-d7p7b6">
           <p class="leafygreen-ui-1kp3ins">
            Read concern
           </p>
          </li>
          <li class="leafygreen-ui-d7p7b6">
           <p class="leafygreen-ui-1kp3ins">
            <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-queryStats-collectionType" target="_self">
             <span>
              Collection type
             </span>
            </a>
           </p>
          </li>
         </ul>
         <p class="leafygreen-ui-1kp3ins">
          Each unique combination of attributes creates a separate
entry in the
          <code class="leafygreen-ui-1l06pbn">
           $queryStats
          </code>
          virtual collection.
         </p>
        </div>
       </div>
      </td>
     </tr>
     <tr class="">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          asOf
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         The UTC time when
         <code class="leafygreen-ui-1l06pbn">
          $queryStats
         </code>
         read this entry from the
         <code class="leafygreen-ui-1l06pbn">
          $queryStats
         </code>
         virtual collection.
         <code class="leafygreen-ui-1l06pbn">
          asOf
         </code>
         does not necessarily
return the same UTC time for each result. Internally, the data
structure is partitioned, and each partition will be read at an
individual point in time.
        </div>
       </div>
      </td>
     </tr>
     <tr class="">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          metrics
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Contains aggregated runtime metrics associated with each query
stats entry. Each query stats entry records statistics for each
query that shares the same key.
        </div>
       </div>
      </td>
     </tr>
    </tbody>
   </table>
  </div>
  <p class="leafygreen-ui-1kp3ins">
   Each document in the output array contains the following fields:
  </p>
  <div class="leafygreen-ui-skkc39" tabindex="0">
   <table class="leafygreen-ui-hr8lsv">
    <colgroup>
     <col style="width:10%"/>
     <col style="width:25%"/>
     <col style="width:10%"/>
     <col style="width:55%"/>
    </colgroup>
    <thead class="leafygreen-ui-a9ho40">
     <tr data-testid="leafygreen-ui-header-row">
      <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
       <div class="leafygreen-ui-ui0te9">
        <div>
         Field
        </div>
       </div>
      </th>
      <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
       <div class="leafygreen-ui-ui0te9">
        <div>
         Type
        </div>
       </div>
      </th>
      <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
       <div class="leafygreen-ui-ui0te9">
        <div>
         Literal or Normalized
        </div>
       </div>
      </th>
      <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
       <div class="leafygreen-ui-ui0te9">
        <div>
         Description
        </div>
       </div>
      </th>
     </tr>
    </thead>
    <tbody>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Document
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Contains the query shape and additional query attributes that
group a set of queries together
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.queryShape
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Document
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Contains attributes used to group similar queries together. For
more information, see
         <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-queryStats-queryShape" target="_self">
          <span>
           Query Shape
           <!-- -->
           .
          </span>
         </a>
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.client
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Document
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Describes client information associated with the key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.client.application
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Document
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         The client application name
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.client.driver
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Document
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Describes the driver used to issue the query
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.client.driver.name
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         String
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Name of the driver used to issue the query. Possible values
include
         <code class="leafygreen-ui-1l06pbn">
          mongosh
         </code>
         and
         <code class="leafygreen-ui-1l06pbn">
          nodejs
         </code>
         .
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.client.driver.version
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         String
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Version number of the driver used to issue the query
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.client.os
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Document
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Describes the operating system used by the client that issued the
query
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.client.os.type
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         String
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Type of the operating system
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.client.os.name
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         String
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Name of the operating system
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.client.os.architecture
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         String
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Architecture of the operating system. Possible values include
         <code class="leafygreen-ui-1l06pbn">
          arm64
         </code>
         and
         <code class="leafygreen-ui-1l06pbn">
          x86_64
         </code>
         .
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.client.os.version
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         String
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Version number of the operating system
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.readConcern
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Document
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         The
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/read-concern/#std-label-read-concern">
          read concern
         </a>
         for the key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.collectionType
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         String
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         The type of collection the query was issued on. For more
information, see
         <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-queryStats-collectionType" target="_self">
          <span>
           Collection Type
           <!-- -->
           .
          </span>
         </a>
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.hint
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Document or String
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Normalized
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         The index that was used as a
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/cursor.hint/#std-label-cursor-hint">
          hint
         </a>
         for the
query
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.batchSize
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         String
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Normalized
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         The
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/cursor.batchSize/#std-label-cursor-batchSize">
          batch size
         </a>
         for the key. Batch size
specifies the number of documents to return in each batch of the
response from the MongoDB instance.
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.comment
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         String
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Normalized
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Comment associated with the key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.maxTimeMS
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         String
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Normalized
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/cursor.maxTimeMS/#std-label-cursor-maxTimeMS">
          maxTimeMS
         </a>
         value associated with the key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.noCursorTimeout
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Boolean
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Normalized
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/cursor.noCursorTimeout/#std-label-cursor-noCursorTimeout">
          noCursorTimeout
         </a>
         option
associated with the key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.allowPartialResults
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         String
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/cursor.allowPartialResults/#std-label-cursor-allowPartialResults">
          allowPartialResults
         </a>
         option
associated with the key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.readPreference
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         String
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/read-preference/#std-label-read-preference">
          Read preference
         </a>
         associated with the key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.apiVersion
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         String
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         The Stable API version associated with the key. See
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/stable-api/#std-label-stable-api">
          Stable API
          <!-- -->
          .
         </a>
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.apiStrict
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Boolean
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         The
         <code class="leafygreen-ui-1l06pbn">
          apiStrict
         </code>
         parameter value associated with the key. See
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/stable-api/#std-label-stable-api-params">
          Stable API Parameters
          <!-- -->
          .
         </a>
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          key.apiDeprecationErrors
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Boolean
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         The
         <code class="leafygreen-ui-1l06pbn">
          apiDeprecationErrors
         </code>
         parameter value associated with the
key. See
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/stable-api/#std-label-stable-api-params">
          Stable API Parameters
          <!-- -->
          .
         </a>
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          keyHash
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         String
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         A hashed representation of the values in the
         <code class="leafygreen-ui-1l06pbn">
          key
         </code>
         . Each unique
         <code class="leafygreen-ui-1l06pbn">
          keyHash
         </code>
         value corresponds to a unique entry in the
         <code class="leafygreen-ui-1l06pbn">
          $queryStats
         </code>
         memory store.
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          metrics
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Document
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Describes runtime statistics for the key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          metrics.lastExecutionMicros
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberLong
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Execution runtime for the most recent query for all queries with
the given key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          metrics.execCount
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberLong
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Number of times that queries with the given key have been
executed
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          metrics.keysExamined
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Document
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Describes the number of keys examined by queries
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .keysExamined
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .sum
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Integer
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Total number of keys examined
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .keysExamined
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .max
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberLong
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Maximum number of keys examined
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .keysExamined
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .min
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberLong
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Fewest number of keys examined
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .keysExamined
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .sumOfSquares
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberDecimal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <p class="leafygreen-ui-1kp3ins">
          Sum of squares of number of keys examined.
         </p>
         <p class="leafygreen-ui-1kp3ins">
          A high
          <code class="leafygreen-ui-1l06pbn">
           sumOfSquares
          </code>
          value indicates high variance in the
number of keys examined in individual queries.
         </p>
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          metrics.docsExamined
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Document
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Describes the number of documents examined by queries
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .docsExamined
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .sum
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Integer
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Total number of documents examined in the query
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .docsExamined
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .max
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberLong
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Maximum number of documents examined
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .docsExamined
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .min
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberLong
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Minimum number of documents examined
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .docsExamined
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .sumOfSquares
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberDecimal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <p class="leafygreen-ui-1kp3ins">
          Sum of squares of number of documents examined.
         </p>
         <p class="leafygreen-ui-1kp3ins">
          A high
          <code class="leafygreen-ui-1l06pbn">
           sumOfSquares
          </code>
          value indicates high variance in the
number of documents examined in individual queries.
         </p>
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          metrics.hasSortStage
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Boolean
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          true
         </code>
         when MongoDB must sort the documents after it receives
the documents from a cursor.
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          metrics.usedDisk
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Boolean
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          true
         </code>
         when the query writes data to temporary files due to
memory restrictions.
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          metrics.fromMultiPlanner
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Boolean
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          true
         </code>
         when the query planner evaluates multiple plans before
choosing the winning execution plan for the query.
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          metrics.fromPlanCache
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Boolean
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          true
         </code>
         when the query planner is able to use a plan from the
plan cache.
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          metrics.totalExecMicros
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Document
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <p class="leafygreen-ui-1kp3ins">
          Describes the total time spent running queries with the given
key. If the query resulted in
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/getMore/#mongodb-dbcommand-dbcmd.getMore">
           <code class="leafygreen-ui-1l06pbn">
            getMores
           </code>
          </a>
          ,
          <code class="leafygreen-ui-1l06pbn">
           totalExecMicros
          </code>
          includes the time spent processing the
          <code class="leafygreen-ui-1l06pbn">
           getMore
          </code>
          requests.
          <code class="leafygreen-ui-1l06pbn">
           totalExecMicros
          </code>
          does not include time
spent waiting for the client.
         </p>
         <p class="leafygreen-ui-1kp3ins">
          All subfields of
          <code class="leafygreen-ui-1l06pbn">
           totalExecMicros
          </code>
          are reported in
microseconds.
         </p>
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .totalExecMicros
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .sum
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberLong
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Total time spent running queries with the given key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .totalExecMicros
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .max
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberLong
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Longest amount of time spent running a query with the given key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .totalExecMicros
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .min
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberLong
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Shortest amount of time spent running a query with the given key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .totalExecMicros
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .sumOfSquares
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberDecimal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Sum of squares of the total execution times for all queries
with the given key. A high
         <code class="leafygreen-ui-1l06pbn">
          sumOfSquares
         </code>
         value indicates
high variance in query execution times.
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .firstResponseExecMicros
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Document
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <p class="leafygreen-ui-1kp3ins">
          Describes the time spent from when a query within the key began
processing to when the server returns the first batch of results
         </p>
         <p class="leafygreen-ui-1kp3ins">
          All subfields of
          <code class="leafygreen-ui-1l06pbn">
           firstResponseExecMicros
          </code>
          are reported in
microseconds.
         </p>
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .firstResponseExecMicros
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .sum
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberLong
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Combined amount of time spent from the beginning of query
processing to when the server returns the first batch of results
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .firstResponseExecMicros
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .max
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberLong
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Longest amount of time spent from the beginning of query
processing to when the server returns the first batch of results
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .firstResponseExecMicros
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .min
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberLong
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Shortest amount of time spent from the beginning of query
processing to when the server returns the first batch of results
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .firstResponseExecMicros
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .sumOfSquares
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberDecimal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <p class="leafygreen-ui-1kp3ins">
          Sum of squares of amounts of time spent from the beginning of
query processing to when the server returns the first batch of
results.
         </p>
         <p class="leafygreen-ui-1kp3ins">
          A high
          <code class="leafygreen-ui-1l06pbn">
           sumOfSquares
          </code>
          value indicates high variance in
query processing times.
         </p>
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          metrics.docsReturned
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Document
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Describes the number of documents returned by queries within the
key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .docsReturned
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .sum
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberLong
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Total number of documents returned by queries with the given key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .docsReturned
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .max
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberLong
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Maximum number of documents returned by a query with the given key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .docsReturned
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .min
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberLong
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Fewest number of documents returned by a query with the given key
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <div class="line-block">
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            metrics
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .docsReturned
           </code>
          </div>
          <div class="line">
           <code class="leafygreen-ui-1l06pbn">
            .sumOfSquares
           </code>
          </div>
         </div>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         NumberDecimal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <p class="leafygreen-ui-1kp3ins">
          Sum of squares of number of documents returned by a query within
the key.
         </p>
         <p class="leafygreen-ui-1kp3ins">
          A high
          <code class="leafygreen-ui-1l06pbn">
           sumOfSquares
          </code>
          value indicates high variance in the
number of documents returned between individual queries.
         </p>
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          metrics.firstSeenTimestamp
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Date
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Time that a query with the given key was first used since the last
restart
        </div>
       </div>
      </td>
     </tr>
     <tr class="leafygreen-ui-15dvrnp">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <code class="leafygreen-ui-1l06pbn">
          metrics.lastSeenTimestamp
         </code>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Date
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Literal
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Time that a query with the given key was most recently used
        </div>
       </div>
      </td>
     </tr>
    </tbody>
   </table>
  </div>
  <span class="leafygreen-ui-1qnjd6d" id="std-label-queryStats-collectionType">
  </span>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Collection Type
    <a class="headerlink leafygreen-ui-1kepx47" href="#collection-type" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="collection-type">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    The
    <code class="leafygreen-ui-1l06pbn">
     key.collectionType
    </code>
    field indicates the type of collection that
the recorded query was issued on. The
    <code class="leafygreen-ui-1l06pbn">
     collectionType
    </code>
    can be one of
the following values:
   </p>
   <div class="leafygreen-ui-skkc39" tabindex="0">
    <table class="leafygreen-ui-hr8lsv">
     <colgroup>
      <col style="width:10%"/>
      <col style="width:20%"/>
     </colgroup>
     <thead class="leafygreen-ui-a9ho40">
      <tr data-testid="leafygreen-ui-header-row">
       <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
        <div class="leafygreen-ui-ui0te9">
         <div>
          Field
         </div>
        </div>
       </th>
       <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
        <div class="leafygreen-ui-ui0te9">
         <div>
          Description
         </div>
        </div>
       </th>
      </tr>
     </thead>
     <tbody>
      <tr class="leafygreen-ui-15dvrnp">
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          <code class="leafygreen-ui-1l06pbn">
           changeStream
          </code>
         </div>
        </div>
       </td>
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          The query was a
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/changeStreams/#std-label-changeStreams">
           change stream operation
           <!-- -->
           .
          </a>
         </div>
        </div>
       </td>
      </tr>
      <tr class="leafygreen-ui-15dvrnp">
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          <code class="leafygreen-ui-1l06pbn">
           collection
          </code>
         </div>
        </div>
       </td>
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          The query was issued on a standard
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/databases-and-collections/#std-label-collections">
           collection
           <!-- -->
           .
          </a>
         </div>
        </div>
       </td>
      </tr>
      <tr class="leafygreen-ui-15dvrnp">
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          <code class="leafygreen-ui-1l06pbn">
           nonExistent
          </code>
         </div>
        </div>
       </td>
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          The query was issued on a collection that does not exist.
         </div>
        </div>
       </td>
      </tr>
      <tr class="leafygreen-ui-15dvrnp">
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          <code class="leafygreen-ui-1l06pbn">
           timeseries
          </code>
         </div>
        </div>
       </td>
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          The query was issued on a
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/timeseries-collections/#std-label-manual-timeseries-collection">
           timeseries collection
           <!-- -->
           .
          </a>
         </div>
        </div>
       </td>
      </tr>
      <tr class="leafygreen-ui-15dvrnp">
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          <code class="leafygreen-ui-1l06pbn">
           view
          </code>
         </div>
        </div>
       </td>
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          The query was issued on a
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/views/#std-label-views-landing-page">
           view
           <!-- -->
           .
          </a>
         </div>
        </div>
       </td>
      </tr>
      <tr class="leafygreen-ui-15dvrnp">
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          <code class="leafygreen-ui-1l06pbn">
           virtual
          </code>
         </div>
        </div>
       </td>
       <td class="leafygreen-ui-1drjk7h">
        <div class="leafygreen-ui-1n4j8xf">
         <div>
          <p class="leafygreen-ui-1kp3ins">
           The query was issued on a virtual collection. The following
operations occur in virtual collections:
          </p>
          <ul class="leafygreen-ui-rioki0">
           <li class="leafygreen-ui-d7p7b6">
            <p class="leafygreen-ui-1kp3ins">
             <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/operator/aggregation/currentOp/#mongodb-pipeline-pipe.-currentOp">
              <code class="leafygreen-ui-1l06pbn">
               $currentOp
              </code>
             </a>
            </p>
           </li>
           <li class="leafygreen-ui-d7p7b6">
            <p class="leafygreen-ui-1kp3ins">
             <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/operator/aggregation/documents/#mongodb-pipeline-pipe.-documents">
              <code class="leafygreen-ui-1l06pbn">
               $documents
              </code>
             </a>
            </p>
           </li>
           <li class="leafygreen-ui-d7p7b6">
            <p class="leafygreen-ui-1kp3ins">
             <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/operator/aggregation/listLocalSessions/#mongodb-pipeline-pipe.-listLocalSessions">
              <code class="leafygreen-ui-1l06pbn">
               $listLocalSessions
              </code>
             </a>
            </p>
           </li>
           <li class="leafygreen-ui-d7p7b6">
            <p class="leafygreen-ui-1kp3ins">
             <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-pipeline-pipe.-queryStats" target="_self">
              <span>
               <code class="leafygreen-ui-1l06pbn">
                $queryStats
               </code>
              </span>
             </a>
            </p>
           </li>
          </ul>
         </div>
        </div>
       </td>
      </tr>
     </tbody>
    </table>
   </div>
   <span class="leafygreen-ui-1qnjd6d" id="std-label-queryStats-queryShape">
   </span>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Query Shape
    <a class="headerlink leafygreen-ui-1kepx47" href="#query-shape" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="query-shape">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    The
    <code class="leafygreen-ui-1l06pbn">
     key.queryShape
    </code>
    document contains query shape fields. To learn
about query shapes, see
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/query-shapes/#std-label-query-shapes">
     Query Shapes
     <!-- -->
     .
    </a>
   </p>
   <p class="leafygreen-ui-1kp3ins">
    The fields in
    <code class="leafygreen-ui-1l06pbn">
     key.queryShape
    </code>
    vary based on the
command that resulted in the query stats entry.
    <code class="leafygreen-ui-1l06pbn">
     $queryStats
    </code>
    creates
query stats entries for
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/aggregate/#mongodb-dbcommand-dbcmd.aggregate">
     <code class="leafygreen-ui-1l06pbn">
      aggregate
     </code>
    </a>
    ,
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/find/#mongodb-dbcommand-dbcmd.find">
     <code class="leafygreen-ui-1l06pbn">
      find
     </code>
    </a>
    , and
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/distinct/#mongodb-dbcommand-dbcmd.distinct">
     <code class="leafygreen-ui-1l06pbn">
      distinct
     </code>
    </a>
    commands.
   </p>
   <p class="leafygreen-ui-1kp3ins">
    Each query shape property corresponds to a query option. For example,
    <code class="leafygreen-ui-1l06pbn">
     key.queryShape.sort
    </code>
    corresponds to the
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/cursor.sort/#mongodb-method-cursor.sort">
     <code class="leafygreen-ui-1l06pbn">
      sort()
     </code>
    </a>
    specification for the query shape.
   </p>
   <span class="leafygreen-ui-1qnjd6d" id="std-label-queryStats-find-query-shape">
   </span>
   <section>
    <h4 class="contains-headerlink leafygreen-ui-1vzlt5f">
     find Command Query Shape
     <a class="headerlink leafygreen-ui-1kepx47" href="#find-command-query-shape" title="Permalink to this heading">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="find-command-query-shape">
      </div>
     </a>
    </h4>
    <p class="leafygreen-ui-1kp3ins">
     The following table describes the query shape properties for
     <code class="leafygreen-ui-1l06pbn">
      find
     </code>
     commands.
    </p>
    <div class="leafygreen-ui-skkc39" tabindex="0">
     <table class="leafygreen-ui-hr8lsv">
      <colgroup>
       <col style="width:10%"/>
       <col style="width:10%"/>
       <col style="width:10%"/>
      </colgroup>
      <thead class="leafygreen-ui-a9ho40">
       <tr data-testid="leafygreen-ui-header-row">
        <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
         <div class="leafygreen-ui-ui0te9">
          <div>
           Field
          </div>
         </div>
        </th>
        <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
         <div class="leafygreen-ui-ui0te9">
          <div>
           Type
          </div>
         </div>
        </th>
        <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
         <div class="leafygreen-ui-ui0te9">
          <div>
           Literal or Normalized
          </div>
         </div>
        </th>
       </tr>
      </thead>
      <tbody>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.filter
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Document
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Normalized
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.sort
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Document
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Literal
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.projection
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Document
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Normalized
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.skip
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Integer
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Normalized
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.limit
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Integer
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Normalized
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.singleBatch
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Boolean
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Literal
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.max
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Document
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Normalized
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.min
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Document
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Normalized
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.returnKey
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Boolean
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Literal
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.showRecordId
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Boolean
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Literal
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.tailable
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Boolean
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Literal
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.oplogReplay
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Boolean
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Literal
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.awaitData
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Boolean
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Literal
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.collation
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Document
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Literal
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.allowDiskUse
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Boolean
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Literal
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.let
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Document
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Normalized
          </div>
         </div>
        </td>
       </tr>
      </tbody>
     </table>
    </div>
    <span class="leafygreen-ui-1qnjd6d" id="std-label-queryStats-aggregate-query-shape">
    </span>
   </section>
   <section>
    <h4 class="contains-headerlink leafygreen-ui-1vzlt5f">
     aggregate Command Query Shape
     <a class="headerlink leafygreen-ui-1kepx47" href="#aggregate-command-query-shape" title="Permalink to this heading">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="aggregate-command-query-shape">
      </div>
     </a>
    </h4>
    <p class="leafygreen-ui-1kp3ins">
     The following table describes the query shape properties for
     <code class="leafygreen-ui-1l06pbn">
      aggregate
     </code>
     commands.
    </p>
    <div class="leafygreen-ui-skkc39" tabindex="0">
     <table class="leafygreen-ui-hr8lsv">
      <colgroup>
       <col style="width:10%"/>
       <col style="width:10%"/>
       <col style="width:10%"/>
      </colgroup>
      <thead class="leafygreen-ui-a9ho40">
       <tr data-testid="leafygreen-ui-header-row">
        <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
         <div class="leafygreen-ui-ui0te9">
          <div>
           Field
          </div>
         </div>
        </th>
        <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
         <div class="leafygreen-ui-ui0te9">
          <div>
           Type
          </div>
         </div>
        </th>
        <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
         <div class="leafygreen-ui-ui0te9">
          <div>
           Literal or Normalized
          </div>
         </div>
        </th>
       </tr>
      </thead>
      <tbody>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.pipeline
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Array
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Normalized
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.explain
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Boolean
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Literal
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.allowDiskUse
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Boolean
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Literal
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.collation
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Document
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Literal
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.hint
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           String or Document
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Normalized
          </div>
         </div>
        </td>
       </tr>
       <tr class="leafygreen-ui-15dvrnp">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.let
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Document
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Normalized
          </div>
         </div>
        </td>
       </tr>
      </tbody>
     </table>
    </div>
    <span class="leafygreen-ui-1qnjd6d" id="std-label-queryStats-distinct-query-shape">
    </span>
   </section>
   <section>
    <h4 class="contains-headerlink leafygreen-ui-1vzlt5f">
     distinct Command Query Shape
     <a class="headerlink leafygreen-ui-1kepx47" href="#distinct-command-query-shape" title="Permalink to this heading">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="distinct-command-query-shape">
      </div>
     </a>
    </h4>
    <p class="leafygreen-ui-1kp3ins">
     The following table describes the query shape properties for
     <code class="leafygreen-ui-1l06pbn">
      distinct
     </code>
     commands.
    </p>
    <div class="leafygreen-ui-skkc39" tabindex="0">
     <table class="leafygreen-ui-hr8lsv">
      <colgroup>
       <col style="width:10%"/>
       <col style="width:10%"/>
       <col style="width:10%"/>
      </colgroup>
      <thead class="leafygreen-ui-a9ho40">
       <tr data-testid="leafygreen-ui-header-row">
        <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
         <div class="leafygreen-ui-ui0te9">
          <div>
           Field
          </div>
         </div>
        </th>
        <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
         <div class="leafygreen-ui-ui0te9">
          <div>
           Type
          </div>
         </div>
        </th>
        <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
         <div class="leafygreen-ui-ui0te9">
          <div>
           Literal or Normalized
          </div>
         </div>
        </th>
       </tr>
      </thead>
      <tbody>
       <tr class="">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.key
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           String
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Literal
          </div>
         </div>
        </td>
       </tr>
       <tr class="">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.collation
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Document
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Normalized
          </div>
         </div>
        </td>
       </tr>
       <tr class="">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            key.queryShape.query
           </code>
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Document
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           Normalized
          </div>
         </div>
        </td>
       </tr>
      </tbody>
     </table>
    </div>
    <span class="leafygreen-ui-1qnjd6d" id="std-label-queryStats-examples">
    </span>
   </section>
  </section>
 </section>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Examples
   <a class="headerlink leafygreen-ui-1kepx47" href="#examples" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="examples">
    </div>
   </a>
  </h2>
  <p class="leafygreen-ui-1kp3ins">
   To run the examples in this section, start with the following data:
  </p>
  <script class="structured_data" type="application/ld+json">
   {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"db.products.insertMany(\n  [\n    { item: \"card\", qty: 15 },\n    { item: \"envelope\", qty: 20 },\n    { item: \"stamps\" , qty: 30 }\n  ]\n)","programmingLanguage":"JavaScript"}
  </script>
  <div class="css-16lmvu9">
   <div class="leafygreen-ui-196mwvg">
    <div class="leafygreen-ui-yzcs8i">
     <pre class="leafygreen-ui-11itue3" tabindex="-1"><code class="lg-highlight-hljs-light javascript leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">db.<span class="lg-highlight-property">products</span>.<span class="lg-highlight-title lg-highlight-function">insertMany</span>(</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  <!-- -->[</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <!-- -->{ <span class="lg-highlight-attr">item</span>: <span class="lg-highlight-string">"card"</span>, <span class="lg-highlight-attr">qty</span>: <span class="lg-highlight-number">15</span> }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <!-- -->{ <span class="lg-highlight-attr">item</span>: <span class="lg-highlight-string">"envelope"</span>, <span class="lg-highlight-attr">qty</span>: <span class="lg-highlight-number">20</span> }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <!-- -->{ <span class="lg-highlight-attr">item</span>: <span class="lg-highlight-string">"stamps"</span> <!-- -->, <span class="lg-highlight-attr">qty</span>: <span class="lg-highlight-number">30</span> }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  ]</td></tr><tr class=""><td class="leafygreen-ui-7razhx">)</td></tr></tbody></table></code></pre>
     <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
      <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
       <div class="leafygreen-ui-xhlipt">
        <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
         <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
         </path>
        </svg>
       </div>
      </button>
     </div>
    </div>
   </div>
  </div>
  <p class="leafygreen-ui-1kp3ins">
   Then, run these commands:
  </p>
  <script class="structured_data" type="application/ld+json">
   {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"db.products.find( { item: \"card\" } )\n\ndb.products.aggregate( [\n   {\n      $match: { qty: { $gt: 20 } }\n   }\n] )","programmingLanguage":"JavaScript"}
  </script>
  <div class="css-16lmvu9">
   <div class="leafygreen-ui-196mwvg">
    <div class="leafygreen-ui-yzcs8i">
     <pre class="leafygreen-ui-11itue3" tabindex="-1"><code class="lg-highlight-hljs-light javascript leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">db.<span class="lg-highlight-property">products</span>.<span class="lg-highlight-title lg-highlight-function">find</span>( <!-- -->{ <span class="lg-highlight-attr">item</span>: <span class="lg-highlight-string">"card"</span> } )</td></tr><tr class=""><td class="leafygreen-ui-7razhx"><div class="leafygreen-ui-ihxujy"></div></td></tr><tr class=""><td class="leafygreen-ui-7razhx">db.<span class="lg-highlight-property">products</span>.<span class="lg-highlight-title lg-highlight-function">aggregate</span>( <!-- -->[</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">$match</span>: <!-- -->{ <span class="lg-highlight-attr">qty</span>: <!-- -->{ <span class="lg-highlight-attr">$gt</span>: <span class="lg-highlight-number">20</span> } }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">] )</td></tr></tbody></table></code></pre>
     <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
      <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
       <div class="leafygreen-ui-xhlipt">
        <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
         <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
         </path>
        </svg>
       </div>
      </button>
     </div>
    </div>
   </div>
  </div>
  <p class="leafygreen-ui-1kp3ins">
   The following examples show the output of
   <code class="leafygreen-ui-1l06pbn">
    $queryStats
   </code>
   using
different types of data transformation:
  </p>
  <ul class="leafygreen-ui-rioki0">
   <li class="leafygreen-ui-d7p7b6">
    <p class="leafygreen-ui-1kp3ins">
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-queryStats-example-untransformed" target="_self">
      <span>
       Untransformed Example
      </span>
     </a>
    </p>
   </li>
   <li class="leafygreen-ui-d7p7b6">
    <p class="leafygreen-ui-1kp3ins">
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-queryStats-example-transformed" target="_self">
      <span>
       Transformed Example
      </span>
     </a>
    </p>
   </li>
  </ul>
  <span class="leafygreen-ui-1qnjd6d" id="std-label-queryStats-example-untransformed">
  </span>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Untransformed Example
    <a class="headerlink leafygreen-ui-1kepx47" href="#untransformed-example" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="untransformed-example">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    Input:
   </p>
   <script class="structured_data" type="application/ld+json">
    {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"db.getSiblingDB(\"admin\").aggregate( [\n   {\n      $queryStats: { }\n   }\n] )","programmingLanguage":"JavaScript"}
   </script>
   <div class="css-16lmvu9">
    <div class="leafygreen-ui-196mwvg">
     <div class="leafygreen-ui-yzcs8i">
      <pre class="leafygreen-ui-11itue3" tabindex="-1"><code class="lg-highlight-hljs-light javascript leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">db.<span class="lg-highlight-title lg-highlight-function">getSiblingDB</span>(<span class="lg-highlight-string">"admin"</span>).<span class="lg-highlight-title lg-highlight-function">aggregate</span>( <!-- -->[</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">$queryStats</span>: <!-- -->{ <!-- -->}</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">] )</td></tr></tbody></table></code></pre>
      <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
       <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
        <div class="leafygreen-ui-xhlipt">
         <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
          <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
          </path>
         </svg>
        </div>
       </button>
      </div>
     </div>
    </div>
   </div>
   <p class="leafygreen-ui-1kp3ins">
    Output:
   </p>
   <script class="structured_data" type="application/ld+json">
    {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"[\n  {\n    key: {\n      queryShape: {\n        cmdNs: { db: 'test', coll: 'products' },\n        command: 'find',\n        filter: { item: { '$eq': '?string' } }\n      },\n      client: {\n        driver: { name: 'nodejs|mongosh', version: '5.1.0' },\n        os: {\n          type: 'Darwin',\n          name: 'darwin',\n          architecture: 'arm64',\n          version: '22.6.0'\n        },\n        platform: 'Node.js v16.19.1, LE (unified)',\n        version: '5.1.0|1.8.0',\n        application: { name: 'mongosh 1.8.0' }\n      },\n      collectionType: 'collection'\n    },\n    keyHash: 'dsoJ+LHAru0z6MJ1/IygJnnLTrlpVYYmPnlmNZbZrLI=',\n    metrics: {\n      lastExecutionMicros: Long(\"4254\"),\n      execCount: Long(\"1\"),\n      totalExecMicros: {\n        sum: Long(\"4254\"),\n        max: Long(\"4254\"),\n        min: Long(\"4254\"),\n        sumOfSquares: Decimal128(\"18096516\")\n      },\n      firstResponseExecMicros: {\n        sum: Long(\"4254\"),\n        max: Long(\"4254\"),\n        min: Long(\"4254\"),\n        sumOfSquares: Decimal128(\"18096516\")\n      },\n      docsReturned: {\n        sum: Long(\"1\"),\n        max: Long(\"1\"),\n        min: Long(\"1\"),\n        sumOfSquares: Decimal128(\"1\")\n      },\n      firstSeenTimestamp: ISODate(\"2023-09-14T12:30:27.989Z\"),\n      latestSeenTimestamp: ISODate(\"2023-09-14T12:30:27.989Z\")\n    },\n    asOf: Timestamp({ t: 1694695007, i: 0 })\n  },\n  {\n    key: {\n      queryShape: {\n        cmdNs: { db: 'test', coll: 'products' },\n        command: 'aggregate',\n        pipeline: [\n          { '$match': { qty: { '$gt': '?number' } } }\n        ]\n      },\n      apiVersion: '1',\n      client: {\n        driver: { name: 'nodejs|mongosh', version: '5.1.0' },\n        os: {\n          type: 'Darwin',\n          name: 'darwin',\n          architecture: 'arm64',\n          version: '22.6.0'\n        },\n        platform: 'Node.js v16.19.1, LE (unified)',\n        version: '5.1.0|1.8.0',\n        application: { name: 'mongosh 1.8.0' }\n      },\n      collectionType: 'collection',\n      cursor: { batchSize: '?number' }\n    },\n    keyHash: '2QLBfL0m1lliStdN4XvBjqVBtZQ6ffaB2L1pJ99twT8=',\n    metrics: {\n      lastExecutionMicros: Long(\"350\"),\n      execCount: Long(\"3\"),\n      totalExecMicros: {\n        sum: Long(\"3084\"),\n        max: Long(\"2499\"),\n        min: Long(\"235\"),\n        sumOfSquares: Decimal128(\"6422726\")\n      },\n      firstResponseExecMicros: {\n        sum: Long(\"3084\"),\n        max: Long(\"2499\"),\n        min: Long(\"235\"),\n        sumOfSquares: Decimal128(\"6422726\")\n      },\n      docsReturned: {\n        sum: Long(\"3\"),\n        max: Long(\"1\"),\n        min: Long(\"1\"),\n        sumOfSquares: Decimal128(\"3\")\n      },\n      firstSeenTimestamp: ISODate(\"2023-11-29T21:16:17.796Z\"),\n      latestSeenTimestamp: ISODate(\"2023-11-29T21:17:12.385Z\")\n    },\n    asOf: Timestamp({ t: 1701292827, i: 0 })\n  }\n]","programmingLanguage":"JavaScript"}
   </script>
   <div class="css-1lju8ps">
    <div class="leafygreen-ui-196mwvg">
     <div class="leafygreen-ui-1jheeh3">
      <pre class="leafygreen-ui-1453az5" tabindex="-1"><code class="lg-highlight-hljs-light javascript leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">[</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">key</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">queryShape</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">cmdNs</span>: <!-- -->{ <span class="lg-highlight-attr">db</span>: <span class="lg-highlight-string">'test'</span>, <span class="lg-highlight-attr">coll</span>: <span class="lg-highlight-string">'products'</span> }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">command</span>: <span class="lg-highlight-string">'find'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">filter</span>: <!-- -->{ <span class="lg-highlight-attr">item</span>: <!-- -->{ <span class="lg-highlight-string">'$eq'</span>: <span class="lg-highlight-string">'?string'</span> } }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">client</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">driver</span>: <!-- -->{ <span class="lg-highlight-attr">name</span>: <span class="lg-highlight-string">'nodejs|mongosh'</span>, <span class="lg-highlight-attr">version</span>: <span class="lg-highlight-string">'5.1.0'</span> }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">os</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">type</span>: <span class="lg-highlight-string">'Darwin'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">name</span>: <span class="lg-highlight-string">'darwin'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">architecture</span>: <span class="lg-highlight-string">'arm64'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">version</span>: <span class="lg-highlight-string">'22.6.0'</span></td></tr><tr class=""><td class="leafygreen-ui-7razhx">        }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">platform</span>: <span class="lg-highlight-string">'Node.js v16.19.1, LE (unified)'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">version</span>: <span class="lg-highlight-string">'5.1.0|1.8.0'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">application</span>: <!-- -->{ <span class="lg-highlight-attr">name</span>: <span class="lg-highlight-string">'mongosh 1.8.0'</span> }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">collectionType</span>: <span class="lg-highlight-string">'collection'</span></td></tr><tr class=""><td class="leafygreen-ui-7razhx">    }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">keyHash</span>: <span class="lg-highlight-string">'dsoJ+LHAru0z6MJ1/IygJnnLTrlpVYYmPnlmNZbZrLI='</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">metrics</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">lastExecutionMicros</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"4254"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">execCount</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">totalExecMicros</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"4254"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"4254"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"4254"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"18096516"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">firstResponseExecMicros</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"4254"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"4254"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"4254"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"18096516"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">docsReturned</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"1"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">firstSeenTimestamp</span>: <span class="lg-highlight-title lg-highlight-class">ISODate</span>(<span class="lg-highlight-string">"2023-09-14T12:30:27.989Z"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">latestSeenTimestamp</span>: <span class="lg-highlight-title lg-highlight-class">ISODate</span>(<span class="lg-highlight-string">"2023-09-14T12:30:27.989Z"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">asOf</span>: <span class="lg-highlight-title lg-highlight-class">Timestamp</span>(<!-- -->{ <span class="lg-highlight-attr">t</span>: <span class="lg-highlight-number">1694695007</span>, <span class="lg-highlight-attr">i</span>: <span class="lg-highlight-number">0</span> })</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">key</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">queryShape</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">cmdNs</span>: <!-- -->{ <span class="lg-highlight-attr">db</span>: <span class="lg-highlight-string">'test'</span>, <span class="lg-highlight-attr">coll</span>: <span class="lg-highlight-string">'products'</span> }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">command</span>: <span class="lg-highlight-string">'aggregate'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">pipeline</span>: <!-- -->[</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <!-- -->{ <span class="lg-highlight-string">'$match'</span>: <!-- -->{ <span class="lg-highlight-attr">qty</span>: <!-- -->{ <span class="lg-highlight-string">'$gt'</span>: <span class="lg-highlight-string">'?number'</span> } } }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        ]</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">apiVersion</span>: <span class="lg-highlight-string">'1'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">client</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">driver</span>: <!-- -->{ <span class="lg-highlight-attr">name</span>: <span class="lg-highlight-string">'nodejs|mongosh'</span>, <span class="lg-highlight-attr">version</span>: <span class="lg-highlight-string">'5.1.0'</span> }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">os</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">type</span>: <span class="lg-highlight-string">'Darwin'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">name</span>: <span class="lg-highlight-string">'darwin'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">architecture</span>: <span class="lg-highlight-string">'arm64'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">version</span>: <span class="lg-highlight-string">'22.6.0'</span></td></tr><tr class=""><td class="leafygreen-ui-7razhx">        }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">platform</span>: <span class="lg-highlight-string">'Node.js v16.19.1, LE (unified)'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">version</span>: <span class="lg-highlight-string">'5.1.0|1.8.0'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">application</span>: <!-- -->{ <span class="lg-highlight-attr">name</span>: <span class="lg-highlight-string">'mongosh 1.8.0'</span> }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">collectionType</span>: <span class="lg-highlight-string">'collection'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">cursor</span>: <!-- -->{ <span class="lg-highlight-attr">batchSize</span>: <span class="lg-highlight-string">'?number'</span> }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">keyHash</span>: <span class="lg-highlight-string">'2QLBfL0m1lliStdN4XvBjqVBtZQ6ffaB2L1pJ99twT8='</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">metrics</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">lastExecutionMicros</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"350"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">execCount</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"3"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">totalExecMicros</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"3084"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"2499"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"235"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"6422726"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">firstResponseExecMicros</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"3084"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"2499"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"235"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"6422726"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">docsReturned</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"3"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"3"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">firstSeenTimestamp</span>: <span class="lg-highlight-title lg-highlight-class">ISODate</span>(<span class="lg-highlight-string">"2023-11-29T21:16:17.796Z"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">latestSeenTimestamp</span>: <span class="lg-highlight-title lg-highlight-class">ISODate</span>(<span class="lg-highlight-string">"2023-11-29T21:17:12.385Z"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">asOf</span>: <span class="lg-highlight-title lg-highlight-class">Timestamp</span>(<!-- -->{ <span class="lg-highlight-attr">t</span>: <span class="lg-highlight-number">1701292827</span>, <span class="lg-highlight-attr">i</span>: <span class="lg-highlight-number">0</span> })</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">]</td></tr></tbody></table></code></pre>
     </div>
    </div>
   </div>
   <span class="leafygreen-ui-1qnjd6d" id="std-label-queryStats-example-transformed">
   </span>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Transformed Example
    <a class="headerlink leafygreen-ui-1kepx47" href="#transformed-example" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="transformed-example">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    Input:
   </p>
   <script class="structured_data" type="application/ld+json">
    {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"db.getSiblingDB(\"admin\").aggregate( [\n   {\n      $queryStats: {\n         transformIdentifiers: {\n            algorithm: \"hmac-sha-256\" ,\n            hmacKey: BinData(8, \"87c4082f169d3fef0eef34dc8e23458cbb457c3sf3n2\")\n         }\n       }\n    }\n ] )","programmingLanguage":"JavaScript"}
   </script>
   <div class="css-16lmvu9">
    <div class="leafygreen-ui-196mwvg">
     <div class="leafygreen-ui-1b1bvay">
      <pre class="leafygreen-ui-11itue3" tabindex="0"><code class="lg-highlight-hljs-light javascript leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">db.<span class="lg-highlight-title lg-highlight-function">getSiblingDB</span>(<span class="lg-highlight-string">"admin"</span>).<span class="lg-highlight-title lg-highlight-function">aggregate</span>( <!-- -->[</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">$queryStats</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">         <span class="lg-highlight-attr">transformIdentifiers</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">            <span class="lg-highlight-attr">algorithm</span>: <span class="lg-highlight-string">"hmac-sha-256"</span> <!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">            <span class="lg-highlight-attr">hmacKey</span>: <span class="lg-highlight-title lg-highlight-class">BinData</span>(<span class="lg-highlight-number">8</span>, <span class="lg-highlight-string">"87c4082f169d3fef0eef34dc8e23458cbb457c3sf3n2"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">         }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">       }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    }</td></tr><tr class=""><td class="leafygreen-ui-7razhx"> ] )</td></tr></tbody></table></code></pre>
      <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
       <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
        <div class="leafygreen-ui-xhlipt">
         <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
          <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
          </path>
         </svg>
        </div>
       </button>
      </div>
     </div>
    </div>
   </div>
   <p class="leafygreen-ui-1kp3ins">
    Output:
   </p>
   <script class="structured_data" type="application/ld+json">
    {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"[\n  {\n    key: {\n      queryShape: {\n        cmdNs: {\n          db: 'Mtrt3iG7dsX5c5uCSIhSVlcu5qD3u3xx2EQnS1dJLxM=',\n          coll: '3oJE6AyOuf8h5NqWiXETxulFlPm3QUXbMnMjL2EqAU4='\n        },\n        command: 'find',\n        filter: {\n          'VWVRow7Ure92ajRPfrpWiU8OtDeWcLePFIq0+tooBng=': { '$eq': '?string' }\n        }\n      },\n      client: {\n        driver: { name: 'nodejs|mongosh', version: '5.1.0' },\n        os: {\n          type: 'Darwin',\n          name: 'darwin',\n          architecture: 'arm64',\n          version: '22.6.0'\n        },\n        platform: 'Node.js v16.19.1, LE (unified)',\n        version: '5.1.0|1.8.0',\n        application: { name: 'mongosh 1.8.0' }\n      },\n      collectionType: 'collection'\n    },\n    keyHash: 'q4vxam+wbk8tTrl8D0MDFH1LQAbI8fWspfkGKhEUROk=',\n    metrics: {\n      lastExecutionMicros: Long(\"4254\"),\n      execCount: Long(\"1\"),\n      keysExamined: {\n        sum: Int(\"5\"),\n        max: Long(\"5\"),\n        min: Long(\"5\"),\n        sumOfSquares: Decimal128(\"25\")\n      },\n      docsExamined: {\n        sum: Long(\"1\"),\n        max: Long(\"1\"),\n        min: Long(\"1\"),\n        sumOfSquares: Decimal128(\"1\")\n      },\n      hasSortStage: false,\n      usedDisk: false,\n      fromMultiPlanner: false,\n      fromPlanCache: true,\n      totalExecMicros: {\n        sum: Long(\"4254\"),\n        max: Long(\"4254\"),\n        min: Long(\"4254\"),\n        sumOfSquares: Decimal128(\"18096516\")\n      },\n      firstResponseExecMicros: {\n        sum: Long(\"4254\"),\n        max: Long(\"4254\"),\n        min: Long(\"4254\"),\n        sumOfSquares: Decimal128(\"18096516\")\n      },\n      docsReturned: {\n        sum: Long(\"1\"),\n        max: Long(\"1\"),\n        min: Long(\"1\"),\n        sumOfSquares: Decimal128(\"1\")\n      },\n      firstSeenTimestamp: ISODate(\"2023-09-14T12:30:27.989Z\"),\n      latestSeenTimestamp: ISODate(\"2023-09-14T12:30:27.989Z\")\n    },\n    asOf: Timestamp({ t: 1694695712, i: 0 })\n  },\n  {\n    key: {\n      queryShape: {\n        cmdNs: {\n          db: 'Mtrt3iG7dsX5c5uCSIhSVlcu5qD3u3xx2EQnS1dJLxM=',\n          coll: '3oJE6AyOuf8h5NqWiXETxulFlPm3QUXbMnMjL2EqAU4='\n        },\n        command: 'aggregate',\n        pipeline: [\n          {\n            '$match': {\n              'RVqrwNEPotzdKnma/T7s4YcgNvpqO29BMDoni2N4IMI=': { '$gt': '?number' }\n            }\n          }\n        ]\n      },\n      apiVersion: '1',\n      client: {\n        driver: { name: 'nodejs|mongosh', version: '5.1.0' },\n        os: {\n          type: 'Darwin',\n          name: 'darwin',\n          architecture: 'arm64',\n          version: '22.6.0'\n        },\n        platform: 'Node.js v16.19.1, LE (unified)',\n        version: '5.1.0|1.8.0',\n        application: { name: 'mongosh 1.8.0' }\n      },\n      collectionType: 'collection',\n      cursor: { batchSize: '?number' }\n    },\n    keyHash: 'HEhpQTYB+/wVoHLkOkMd+EC2jguQlMJ1N/vTE7+b8Js=',\n    metrics: {\n      lastExecutionMicros: Long(\"350\"),\n      execCount: Long(\"3\"),\n      keysExamined: {\n        sum: Int(\"5\"),\n        max: Long(\"5\"),\n        min: Long(\"5\"),\n        sumOfSquares: Decimal128(\"25\")\n      },\n      docsExamined: {\n        sum: Long(\"1\"),\n        max: Long(\"1\"),\n        min: Long(\"1\"),\n        sumOfSquares: Decimal128(\"1\")\n      },\n      hasSortStage: false,\n      usedDisk: false,\n      fromMultiPlanner: false,\n      fromPlanCache: true,\n      totalExecMicros: {\n        sum: Long(\"3084\"),\n        max: Long(\"2499\"),\n        min: Long(\"235\"),\n        sumOfSquares: Decimal128(\"6422726\")\n      },\n      firstResponseExecMicros: {\n        sum: Long(\"3084\"),\n        max: Long(\"2499\"),\n        min: Long(\"235\"),\n        sumOfSquares: Decimal128(\"6422726\")\n      },\n      docsReturned: {\n        sum: Long(\"3\"),\n        max: Long(\"1\"),\n        min: Long(\"1\"),\n        sumOfSquares: Decimal128(\"3\")\n      },\n      firstSeenTimestamp: ISODate(\"2023-11-29T21:16:17.796Z\"),\n      latestSeenTimestamp: ISODate(\"2023-11-29T21:17:12.385Z\")\n    },\n    asOf: Timestamp({ t: 1701293302, i: 0 })\n  },\n]","programmingLanguage":"JavaScript"}
   </script>
   <div class="css-1lju8ps">
    <div class="leafygreen-ui-196mwvg">
     <div class="leafygreen-ui-tyg50d">
      <pre class="leafygreen-ui-1453az5" tabindex="0"><code class="lg-highlight-hljs-light javascript leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">[</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">key</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">queryShape</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">cmdNs</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">db</span>: <span class="lg-highlight-string">'Mtrt3iG7dsX5c5uCSIhSVlcu5qD3u3xx2EQnS1dJLxM='</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">coll</span>: <span class="lg-highlight-string">'3oJE6AyOuf8h5NqWiXETxulFlPm3QUXbMnMjL2EqAU4='</span></td></tr><tr class=""><td class="leafygreen-ui-7razhx">        }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">command</span>: <span class="lg-highlight-string">'find'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">filter</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-string">'VWVRow7Ure92ajRPfrpWiU8OtDeWcLePFIq0+tooBng='</span>: <!-- -->{ <span class="lg-highlight-string">'$eq'</span>: <span class="lg-highlight-string">'?string'</span> }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">client</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">driver</span>: <!-- -->{ <span class="lg-highlight-attr">name</span>: <span class="lg-highlight-string">'nodejs|mongosh'</span>, <span class="lg-highlight-attr">version</span>: <span class="lg-highlight-string">'5.1.0'</span> }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">os</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">type</span>: <span class="lg-highlight-string">'Darwin'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">name</span>: <span class="lg-highlight-string">'darwin'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">architecture</span>: <span class="lg-highlight-string">'arm64'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">version</span>: <span class="lg-highlight-string">'22.6.0'</span></td></tr><tr class=""><td class="leafygreen-ui-7razhx">        }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">platform</span>: <span class="lg-highlight-string">'Node.js v16.19.1, LE (unified)'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">version</span>: <span class="lg-highlight-string">'5.1.0|1.8.0'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">application</span>: <!-- -->{ <span class="lg-highlight-attr">name</span>: <span class="lg-highlight-string">'mongosh 1.8.0'</span> }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">collectionType</span>: <span class="lg-highlight-string">'collection'</span></td></tr><tr class=""><td class="leafygreen-ui-7razhx">    }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">keyHash</span>: <span class="lg-highlight-string">'q4vxam+wbk8tTrl8D0MDFH1LQAbI8fWspfkGKhEUROk='</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">metrics</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">lastExecutionMicros</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"4254"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">execCount</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">keysExamined</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Int</span>(<span class="lg-highlight-string">"5"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"5"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"5"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"25"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">docsExamined</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"1"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">hasSortStage</span>: <span class="lg-highlight-literal">false</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">usedDisk</span>: <span class="lg-highlight-literal">false</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">fromMultiPlanner</span>: <span class="lg-highlight-literal">false</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">fromPlanCache</span>: <span class="lg-highlight-literal">true</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">totalExecMicros</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"4254"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"4254"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"4254"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"18096516"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">firstResponseExecMicros</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"4254"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"4254"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"4254"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"18096516"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">docsReturned</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"1"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">firstSeenTimestamp</span>: <span class="lg-highlight-title lg-highlight-class">ISODate</span>(<span class="lg-highlight-string">"2023-09-14T12:30:27.989Z"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">latestSeenTimestamp</span>: <span class="lg-highlight-title lg-highlight-class">ISODate</span>(<span class="lg-highlight-string">"2023-09-14T12:30:27.989Z"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">asOf</span>: <span class="lg-highlight-title lg-highlight-class">Timestamp</span>(<!-- -->{ <span class="lg-highlight-attr">t</span>: <span class="lg-highlight-number">1694695712</span>, <span class="lg-highlight-attr">i</span>: <span class="lg-highlight-number">0</span> })</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">key</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">queryShape</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">cmdNs</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">db</span>: <span class="lg-highlight-string">'Mtrt3iG7dsX5c5uCSIhSVlcu5qD3u3xx2EQnS1dJLxM='</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">coll</span>: <span class="lg-highlight-string">'3oJE6AyOuf8h5NqWiXETxulFlPm3QUXbMnMjL2EqAU4='</span></td></tr><tr class=""><td class="leafygreen-ui-7razhx">        }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">command</span>: <span class="lg-highlight-string">'aggregate'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">pipeline</span>: <!-- -->[</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">            <span class="lg-highlight-string">'$match'</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">              <span class="lg-highlight-string">'RVqrwNEPotzdKnma/T7s4YcgNvpqO29BMDoni2N4IMI='</span>: <!-- -->{ <span class="lg-highlight-string">'$gt'</span>: <span class="lg-highlight-string">'?number'</span> }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">            }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        ]</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">apiVersion</span>: <span class="lg-highlight-string">'1'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">client</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">driver</span>: <!-- -->{ <span class="lg-highlight-attr">name</span>: <span class="lg-highlight-string">'nodejs|mongosh'</span>, <span class="lg-highlight-attr">version</span>: <span class="lg-highlight-string">'5.1.0'</span> }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">os</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">type</span>: <span class="lg-highlight-string">'Darwin'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">name</span>: <span class="lg-highlight-string">'darwin'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">architecture</span>: <span class="lg-highlight-string">'arm64'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">          <span class="lg-highlight-attr">version</span>: <span class="lg-highlight-string">'22.6.0'</span></td></tr><tr class=""><td class="leafygreen-ui-7razhx">        }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">platform</span>: <span class="lg-highlight-string">'Node.js v16.19.1, LE (unified)'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">version</span>: <span class="lg-highlight-string">'5.1.0|1.8.0'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">application</span>: <!-- -->{ <span class="lg-highlight-attr">name</span>: <span class="lg-highlight-string">'mongosh 1.8.0'</span> }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">collectionType</span>: <span class="lg-highlight-string">'collection'</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">cursor</span>: <!-- -->{ <span class="lg-highlight-attr">batchSize</span>: <span class="lg-highlight-string">'?number'</span> }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">keyHash</span>: <span class="lg-highlight-string">'HEhpQTYB+/wVoHLkOkMd+EC2jguQlMJ1N/vTE7+b8Js='</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">metrics</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">lastExecutionMicros</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"350"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">execCount</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"3"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">keysExamined</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Int</span>(<span class="lg-highlight-string">"5"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"5"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"5"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"25"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">docsExamined</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"1"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">hasSortStage</span>: <span class="lg-highlight-literal">false</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">usedDisk</span>: <span class="lg-highlight-literal">false</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">fromMultiPlanner</span>: <span class="lg-highlight-literal">false</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">fromPlanCache</span>: <span class="lg-highlight-literal">true</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">totalExecMicros</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"3084"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"2499"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"235"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"6422726"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">firstResponseExecMicros</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"3084"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"2499"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"235"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"6422726"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">docsReturned</span>: <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sum</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"3"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">max</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">min</span>: <span class="lg-highlight-title lg-highlight-class">Long</span>(<span class="lg-highlight-string">"1"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">        <span class="lg-highlight-attr">sumOfSquares</span>: <span class="lg-highlight-title lg-highlight-class">Decimal128</span>(<span class="lg-highlight-string">"3"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">firstSeenTimestamp</span>: <span class="lg-highlight-title lg-highlight-class">ISODate</span>(<span class="lg-highlight-string">"2023-11-29T21:16:17.796Z"</span>)<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-attr">latestSeenTimestamp</span>: <span class="lg-highlight-title lg-highlight-class">ISODate</span>(<span class="lg-highlight-string">"2023-11-29T21:17:12.385Z"</span>)</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-attr">asOf</span>: <span class="lg-highlight-title lg-highlight-class">Timestamp</span>(<!-- -->{ <span class="lg-highlight-attr">t</span>: <span class="lg-highlight-number">1701293302</span>, <span class="lg-highlight-attr">i</span>: <span class="lg-highlight-number">0</span> })</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  }<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">]</td></tr></tbody></table></code></pre>
     </div>
    </div>
   </div>
  </section>
 </section>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   MongoDB Atlas Data Collection
   <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-atlas-data-collection" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="mongodb-atlas-data-collection">
    </div>
   </a>
  </h2>
  <p class="leafygreen-ui-1kp3ins">
   MongoDB Atlas periodically uses
   <code class="leafygreen-ui-1l06pbn">
    $queryStats
   </code>
   to collect anonymized
data about your queries, which helps improve MongoDB products. Your data
may also be used to make feature suggestions based on usage. MongoDB
retains the data it collects with
   <code class="leafygreen-ui-1l06pbn">
    $queryStats
   </code>
   for four years.
  </p>
  <p class="leafygreen-ui-1kp3ins">
   When Atlas runs
   <code class="leafygreen-ui-1l06pbn">
    $queryStats
   </code>
   on your deployment, it uses a unique
HMAC key per Atlas organization to transform your data and avoid
collecting sensitive information.
  </p>
 </section>
</section>
