<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="sys-statements-with-temp-tables">
      </a>
      30.4.3.40 The statements_with_temp_tables and x$statements_with_temp_tables Views
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045062012784">
  </a>
  <a class="indexterm" name="idm46045062011328">
  </a>
  <a class="indexterm" name="idm46045062009824">
  </a>
  <a class="indexterm" name="idm46045062008320">
  </a>
  <p>
   These views list normalized statements that have used
          temporary tables. By default, rows are sorted by descending
          number of on-disk temporary tables used and descending number
          of in-memory temporary tables used.
  </p>
  <p>
   The
   <a class="link" href="sys-statements-with-temp-tables.html" title="30.4.3.40 The statements_with_temp_tables and x$statements_with_temp_tables Views">
    <code class="literal">
     statements_with_temp_tables
    </code>
   </a>
   and
   <a class="link" href="sys-statements-with-temp-tables.html" title="30.4.3.40 The statements_with_temp_tables and x$statements_with_temp_tables Views">
    <code class="literal">
     x$statements_with_temp_tables
    </code>
   </a>
   views have these columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       query
      </code>
     </p>
     <p>
      The normalized statement string.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       db
      </code>
     </p>
     <p>
      The default database for the statement, or
      <code class="literal">
       NULL
      </code>
      if there is none.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       exec_count
      </code>
     </p>
     <p>
      The total number of times the statement has executed.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       total_latency
      </code>
     </p>
     <p>
      The total wait time of timed occurrences of the statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       memory_tmp_tables
      </code>
     </p>
     <p>
      The total number of internal in-memory temporary tables
              created by occurrences of the statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       disk_tmp_tables
      </code>
     </p>
     <p>
      The total number of internal on-disk temporary tables
              created by occurrences of the statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       avg_tmp_tables_per_query
      </code>
     </p>
     <p>
      The average number of internal temporary tables created
              per occurrence of the statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       tmp_tables_to_disk_pct
      </code>
     </p>
     <p>
      The percentage of internal in-memory temporary tables that
              were converted to on-disk tables.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       first_seen
      </code>
     </p>
     <p>
      The time at which the statement was first seen.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       last_seen
      </code>
     </p>
     <p>
      The time at which the statement was most recently seen.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       digest
      </code>
     </p>
     <p>
      The statement digest.
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
