<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h2 class="title">
      <a name="thread-pool-information-schema-tables">
      </a>
      28.5 INFORMATION_SCHEMA Thread Pool Tables
     </h2>
    </div>
   </div>
  </div>
  <div class="toc">
   <dl class="toc">
    <dt>
     <span class="section">
      <a href="information-schema-thread-pool-table-reference.html">
       28.5.1 INFORMATION_SCHEMA Thread Pool Table Reference
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="information-schema-tp-thread-group-state-table.html">
       28.5.2 The INFORMATION_SCHEMA TP_THREAD_GROUP_STATE Table
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="information-schema-tp-thread-group-stats-table.html">
       28.5.3 The INFORMATION_SCHEMA TP_THREAD_GROUP_STATS Table
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="information-schema-tp-thread-state-table.html">
       28.5.4 The INFORMATION_SCHEMA TP_THREAD_STATE Table
      </a>
     </span>
    </dt>
   </dl>
  </div>
  <a class="indexterm" name="idm46045076102208">
  </a>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    The
    <code class="literal">
     INFORMATION_SCHEMA
    </code>
    thread pool tables are
      deprecated, and subject to removal in a future version of MySQL.
      You should use the versions available as Performance Schema tables
      instead. See
    <a class="xref" href="performance-schema-thread-pool-tables.html" title="29.12.16 Performance Schema Thread Pool Tables">
     Section 29.12.16, “Performance Schema Thread Pool Tables”
    </a>
    .
      Applications should transition away from the old tables to the new
      tables. For example, if an application uses this query:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa87104721"><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">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span>TP_THREAD_STATE<span class="token punctuation">;</span></code></pre>
   </div>
   <p>
    The application should use this query instead:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa7547241"><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">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> performance_schema<span class="token punctuation">.</span>tp_thread_state<span class="token punctuation">;</span></code></pre>
   </div>
  </div>
  <p>
   The following sections describe the
   <code class="literal">
    INFORMATION_SCHEMA
   </code>
   tables associated with the
    thread pool plugin (see
   <a class="xref" href="thread-pool.html" title="7.6.3 MySQL Enterprise Thread Pool">
    Section 7.6.3, “MySQL Enterprise Thread Pool”
   </a>
   ). They provide
    information about thread pool operation:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="link" href="information-schema-tp-thread-group-state-table.html" title="28.5.2 The INFORMATION_SCHEMA TP_THREAD_GROUP_STATE Table">
       <code class="literal">
        TP_THREAD_GROUP_STATE
       </code>
      </a>
      : Information
        about thread pool thread group states
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="information-schema-tp-thread-group-stats-table.html" title="28.5.3 The INFORMATION_SCHEMA TP_THREAD_GROUP_STATS Table">
       <code class="literal">
        TP_THREAD_GROUP_STATS
       </code>
      </a>
      : Thread group
        statistics
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="information-schema-tp-thread-state-table.html" title="28.5.4 The INFORMATION_SCHEMA TP_THREAD_STATE Table">
       <code class="literal">
        TP_THREAD_STATE
       </code>
      </a>
      : Information about
        thread pool thread states
     </p>
    </li>
   </ul>
  </div>
  <p>
   Rows in these tables represent snapshots in time. In the case of
   <code class="literal">
    TP_THREAD_STATE
   </code>
   , all rows for a thread group
    comprise a snapshot in time. Thus, the MySQL server holds the mutex
    of the thread group while producing the snapshot. But it does not
    hold mutexes on all thread groups at the same time, to prevent a
    statement against
   <code class="literal">
    TP_THREAD_STATE
   </code>
   from blocking
    the entire MySQL server.
  </p>
  <p>
   The
   <code class="literal">
    INFORMATION_SCHEMA
   </code>
   thread pool tables are
    implemented by individual plugins and the decision whether to load
    one can be made independently of the others (see
   <a class="xref" href="thread-pool-installation.html" title="7.6.3.2 Thread Pool Installation">
    Section 7.6.3.2, “Thread Pool Installation”
   </a>
   ). However, the content of
    all the tables depends on the thread pool plugin being enabled. If a
    table plugin is enabled but the thread pool plugin is not, the table
    becomes visible and can be accessed but is empty.
  </p>
 </div>
 <br/>
</div>
