<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="sys-processlist">
      </a>
      30.4.3.22 The processlist and x$processlist Views
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045062686944">
  </a>
  <a class="indexterm" name="idm46045062685488">
  </a>
  <a class="indexterm" name="idm46045062684000">
  </a>
  <a class="indexterm" name="idm46045062682512">
  </a>
  <p>
   The MySQL process list indicates the operations currently
          being performed by the set of threads executing within the
          server. The
   <a class="link" href="sys-processlist.html" title="30.4.3.22 The processlist and x$processlist Views">
    <code class="literal">
     processlist
    </code>
   </a>
   and
   <a class="link" href="sys-processlist.html" title="30.4.3.22 The processlist and x$processlist Views">
    <code class="literal">
     x$processlist
    </code>
   </a>
   views summarize
          process information. They provide more complete information
          than the
   <a class="link" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
    <code class="literal">
     SHOW PROCESSLIST
    </code>
   </a>
   statement and the
   <code class="literal">
    INFORMATION_SCHEMA
   </code>
   <a class="link" href="information-schema-processlist-table.html" title="28.3.23 The INFORMATION_SCHEMA PROCESSLIST Table">
    <code class="literal">
     PROCESSLIST
    </code>
   </a>
   table, and are also
          nonblocking. By default, rows are sorted by descending process
          time and descending wait time. For a comparison of process
          information sources, see
   <a class="xref" href="processlist-access.html#processlist-sources" title="Sources of Process Information">
    Sources of Process Information
   </a>
   .
  </p>
  <p>
   The column descriptions here are brief. For additional
          information, see the description of the Performance Schema
   <a class="link" href="performance-schema-threads-table.html" title="29.12.22.8 The threads Table">
    <code class="literal">
     threads
    </code>
   </a>
   table at
   <a class="xref" href="performance-schema-threads-table.html" title="29.12.22.8 The threads Table">
    Section 29.12.22.8, “The threads Table”
   </a>
   .
  </p>
  <p>
   The
   <a class="link" href="sys-processlist.html" title="30.4.3.22 The processlist and x$processlist Views">
    <code class="literal">
     processlist
    </code>
   </a>
   and
   <a class="link" href="sys-processlist.html" title="30.4.3.22 The processlist and x$processlist Views">
    <code class="literal">
     x$processlist
    </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">
       thd_id
      </code>
     </p>
     <p>
      The thread ID.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       conn_id
      </code>
     </p>
     <p>
      The connection ID.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       user
      </code>
     </p>
     <p>
      The thread user or thread name.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       db
      </code>
     </p>
     <p>
      The default database for the thread, or
      <code class="literal">
       NULL
      </code>
      if there is none.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       command
      </code>
     </p>
     <p>
      For foreground threads, the type of command the thread is
              executing on behalf of the client, or
      <code class="literal">
       Sleep
      </code>
      if the session is idle.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       state
      </code>
     </p>
     <p>
      An action, event, or state that indicates what the thread
              is doing.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       time
      </code>
     </p>
     <p>
      The time in seconds that the thread has been in its
              current state.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       current_statement
      </code>
     </p>
     <p>
      The statement the thread is executing, or
      <code class="literal">
       NULL
      </code>
      if it is not executing any
              statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       execution_engine
      </code>
     </p>
     <p>
      The query execution engine. The value is either
      <code class="literal">
       PRIMARY
      </code>
      or
      <code class="literal">
       SECONDARY
      </code>
      . For use with HeatWave Service and
              HeatWave, where the
      <code class="literal">
       PRIMARY
      </code>
      engine is
      <code class="literal">
       InnoDB
      </code>
      and
      <code class="literal">
       SECONDARY
      </code>
      engine is HeatWave (
      <code class="literal">
       RAPID
      </code>
      ). For MySQL Community Edition
              Server, MySQL Enterprise Edition Server (on-premise), and HeatWave Service without
              HeatWave, the value is always
      <code class="literal">
       PRIMARY
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       statement_latency
      </code>
     </p>
     <p>
      How long the statement has been executing.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       progress
      </code>
     </p>
     <p>
      The percentage of work completed for stages that support
              progress reporting. See
      <a class="xref" href="sys-schema-progress-reporting.html" title="30.3 sys Schema Progress Reporting">
       Section 30.3, “sys Schema Progress Reporting”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       lock_latency
      </code>
     </p>
     <p>
      The time spent waiting for locks by the current statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       cpu_latency
      </code>
     </p>
     <p>
      The time spent on CPU for the current thread.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       rows_examined
      </code>
     </p>
     <p>
      The number of rows read from storage engines by the
              current statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       rows_sent
      </code>
     </p>
     <p>
      The number of rows returned by the current statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       rows_affected
      </code>
     </p>
     <p>
      The number of rows affected by the current statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       tmp_tables
      </code>
     </p>
     <p>
      The number of internal in-memory temporary tables created
              by the current statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       tmp_disk_tables
      </code>
     </p>
     <p>
      The number of internal on-disk temporary tables created by
              the current statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       full_scan
      </code>
     </p>
     <p>
      The number of full table scans performed by the current
              statement.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       last_statement
      </code>
     </p>
     <p>
      The last statement executed by the thread, if there is no
              currently executing statement or wait.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       last_statement_latency
      </code>
     </p>
     <p>
      How long the last statement executed.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       current_memory
      </code>
     </p>
     <p>
      The number of bytes allocated by the thread.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       last_wait
      </code>
     </p>
     <p>
      The name of the most recent wait event for the thread.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       last_wait_latency
      </code>
     </p>
     <p>
      The wait time of the most recent wait event for the
              thread.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       source
      </code>
     </p>
     <p>
      The source file and line number containing the
              instrumented code that produced the event.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       trx_latency
      </code>
     </p>
     <p>
      The wait time of the current transaction for the thread.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       trx_state
      </code>
     </p>
     <p>
      The state for the current transaction for the thread.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       trx_autocommit
      </code>
     </p>
     <p>
      Whether autocommit mode was enabled when the current
              transaction started.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       pid
      </code>
     </p>
     <p>
      The client process ID.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       program_name
      </code>
     </p>
     <p>
      The client program name.
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
