<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="show-status">
      </a>
      15.7.7.37 SHOW STATUS Statement
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045169335088">
  </a>
  <a class="indexterm" name="idm46045169334016">
  </a>
  <a class="indexterm" name="idm46045169332944">
  </a>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa86133045"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SHOW</span> <span class="token punctuation">[</span><span class="token keyword">GLOBAL</span> <span class="token operator">|</span> <span class="token keyword">SESSION</span><span class="token punctuation">]</span> <span class="token keyword">STATUS</span>
    <span class="token punctuation">[</span><span class="token operator">LIKE</span> <span class="token string">'<em class="replaceable">pattern</em>'</span> <span class="token operator">|</span> <span class="token keyword">WHERE</span> <em class="replaceable">expr</em><span class="token punctuation">]</span></code></pre>
  </div>
  <a class="indexterm" name="idm46045169327584">
  </a>
  <p>
   <a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
    <code class="literal">
     SHOW STATUS
    </code>
   </a>
   provides server
        status information (see
   <a class="xref" href="server-status-variables.html" title="7.1.10 Server Status Variables">
    Section 7.1.10, “Server Status Variables”
   </a>
   ). This statement does
        not require any privilege. It requires only the ability to
        connect to the server.
  </p>
  <p>
   Status variable information is also available from these
        sources:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Performance Schema tables. See
      <a class="xref" href="performance-schema-status-variable-tables.html" title="29.12.15 Performance Schema Status Variable Tables">
       Section 29.12.15, “Performance Schema Status Variable Tables”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      The
      <a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
       <span class="command">
        <strong>
         mysqladmin extended-status
        </strong>
       </span>
      </a>
      command.
            See
      <a class="xref" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
       Section 6.5.2, “mysqladmin — A MySQL Server Administration Program”
      </a>
      .
     </p>
    </li>
   </ul>
  </div>
  <p>
   For
   <a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
    <code class="literal">
     SHOW STATUS
    </code>
   </a>
   , a
   <a class="link" href="string-comparison-functions.html#operator_like">
    <code class="literal">
     LIKE
    </code>
   </a>
   clause, if present, indicates
        which variable names to match. A
   <code class="literal">
    WHERE
   </code>
   clause
        can be given to select rows using more general conditions, as
        discussed in
   <a class="xref" href="extended-show.html" title="28.8 Extensions to SHOW Statements">
    Section 28.8, “Extensions to SHOW Statements”
   </a>
   .
  </p>
  <p>
   <a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
    <code class="literal">
     SHOW STATUS
    </code>
   </a>
   accepts an optional
   <code class="literal">
    GLOBAL
   </code>
   or
   <code class="literal">
    SESSION
   </code>
   variable
        scope modifier:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      With a
      <code class="literal">
       GLOBAL
      </code>
      modifier, the statement
            displays the global status values. A global status variable
            may represent status for some aspect of the server itself
            (for example,
      <code class="literal">
       Aborted_connects
      </code>
      ), or the
            aggregated status over all connections to MySQL (for
            example,
      <code class="literal">
       Bytes_received
      </code>
      and
      <code class="literal">
       Bytes_sent
      </code>
      ). If a variable has no global
            value, the session value is displayed.
     </p>
    </li>
    <li class="listitem">
     <p>
      With a
      <code class="literal">
       SESSION
      </code>
      modifier, the statement
            displays the status variable values for the current
            connection. If a variable has no session value, the global
            value is displayed.
      <code class="literal">
       LOCAL
      </code>
      is a synonym
            for
      <code class="literal">
       SESSION
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      If no modifier is present, the default is
      <code class="literal">
       SESSION
      </code>
      .
     </p>
    </li>
   </ul>
  </div>
  <p>
   The scope for each status variable is listed at
   <a class="xref" href="server-status-variables.html" title="7.1.10 Server Status Variables">
    Section 7.1.10, “Server Status Variables”
   </a>
   .
  </p>
  <p>
   Each invocation of the
   <a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
    <code class="literal">
     SHOW
        STATUS
    </code>
   </a>
   statement uses an internal temporary table and
        increments the global
   <a class="link" href="server-status-variables.html#statvar_Created_tmp_tables">
    <code class="literal">
     Created_tmp_tables
    </code>
   </a>
   value.
  </p>
  <p>
   Partial output is shown here. The list of names and values may
        differ for your server. The meaning of each variable is given in
   <a class="xref" href="server-status-variables.html" title="7.1.10 Server Status Variables">
    Section 7.1.10, “Server Status Variables”
   </a>
   .
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa8856977"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SHOW</span> <span class="token keyword">STATUS</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Variable_name            <span class="token punctuation">|</span> Value      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Aborted_clients          <span class="token punctuation">|</span> 0          <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Aborted_connects         <span class="token punctuation">|</span> 0          <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Bytes_received           <span class="token punctuation">|</span> 155372598  <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Bytes_sent               <span class="token punctuation">|</span> 1176560426 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Connections              <span class="token punctuation">|</span> 30023      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Created_tmp_disk_tables  <span class="token punctuation">|</span> 0          <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Created_tmp_tables       <span class="token punctuation">|</span> 8340       <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Created_tmp_files        <span class="token punctuation">|</span> 60         <span class="token punctuation">|</span></span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token output"><span class="token punctuation">|</span> Open_tables              <span class="token punctuation">|</span> 1          <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Open_files               <span class="token punctuation">|</span> 2          <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Open_streams             <span class="token punctuation">|</span> 0          <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Opened_tables            <span class="token punctuation">|</span> 44600      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Questions                <span class="token punctuation">|</span> 2026873    <span class="token punctuation">|</span></span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token output"><span class="token punctuation">|</span> Table_locks_immediate    <span class="token punctuation">|</span> 1920382    <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Table_locks_waited       <span class="token punctuation">|</span> 0          <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Threads_cached           <span class="token punctuation">|</span> 0          <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Threads_created          <span class="token punctuation">|</span> 30022      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Threads_connected        <span class="token punctuation">|</span> 1          <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Threads_running          <span class="token punctuation">|</span> 1          <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Uptime                   <span class="token punctuation">|</span> 80380      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
  </div>
  <p>
   With a
   <a class="link" href="string-comparison-functions.html#operator_like">
    <code class="literal">
     LIKE
    </code>
   </a>
   clause, the statement
        displays only rows for those variables with names that match the
        pattern:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa45715258"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SHOW</span> <span class="token keyword">STATUS</span> <span class="token operator">LIKE</span> <span class="token string">'Key%'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Variable_name      <span class="token punctuation">|</span> Value    <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Key_blocks_used    <span class="token punctuation">|</span> 14955    <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Key_read_requests  <span class="token punctuation">|</span> 96854827 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Key_reads          <span class="token punctuation">|</span> 162040   <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Key_write_requests <span class="token punctuation">|</span> 7589728  <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Key_writes         <span class="token punctuation">|</span> 3813196  <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
  </div>
 </div>
 <br/>
</div>
