<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="performance-schema-setup-consumers-table">
      </a>
      29.12.2.2 The setup_consumers Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045073895824">
  </a>
  <a class="indexterm" name="idm46045073894336">
  </a>
  <p>
   The
   <a class="link" href="performance-schema-setup-consumers-table.html" title="29.12.2.2 The setup_consumers Table">
    <code class="literal">
     setup_consumers
    </code>
   </a>
   table lists
          the types of consumers for which event information can be
          stored and which are enabled:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa36832662"><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">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> performance_schema<span class="token punctuation">.</span>setup_consumers<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 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> NAME                             <span class="token punctuation">|</span> ENABLED <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 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> events_stages_current            <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> events_stages_history            <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> events_stages_history_long       <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> events_statements_current        <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> events_statements_history        <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> events_statements_history_long   <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> events_transactions_current      <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> events_transactions_history      <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> events_transactions_history_long <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> events_waits_current             <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> events_waits_history             <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> events_waits_history_long        <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> global_instrumentation           <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> thread_instrumentation           <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> statements_digest                <span class="token punctuation">|</span> YES     <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 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>
   The consumer settings in the
   <a class="link" href="performance-schema-setup-consumers-table.html" title="29.12.2.2 The setup_consumers Table">
    <code class="literal">
     setup_consumers
    </code>
   </a>
   table form a
          hierarchy from higher levels to lower. For detailed
          information about the effect of enabling different consumers,
          see
   <a class="xref" href="performance-schema-consumer-filtering.html" title="29.4.7 Pre-Filtering by Consumer">
    Section 29.4.7, “Pre-Filtering by Consumer”
   </a>
   .
  </p>
  <p>
   Modifications to the
   <a class="link" href="performance-schema-setup-consumers-table.html" title="29.12.2.2 The setup_consumers Table">
    <code class="literal">
     setup_consumers
    </code>
   </a>
   table affect
          monitoring immediately.
  </p>
  <p>
   The
   <a class="link" href="performance-schema-setup-consumers-table.html" title="29.12.2.2 The setup_consumers Table">
    <code class="literal">
     setup_consumers
    </code>
   </a>
   table has
          these columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       NAME
      </code>
     </p>
     <p>
      The consumer name.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ENABLED
      </code>
     </p>
     <p>
      Whether the consumer is enabled. The value is
      <code class="literal">
       YES
      </code>
      or
      <code class="literal">
       NO
      </code>
      . This
              column can be modified. If you disable a consumer, the
              server does not spend time adding event information to it.
     </p>
    </li>
   </ul>
  </div>
  <p>
   The
   <a class="link" href="performance-schema-setup-consumers-table.html" title="29.12.2.2 The setup_consumers Table">
    <code class="literal">
     setup_consumers
    </code>
   </a>
   table has
          these indexes:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Primary key on (
      <code class="literal">
       NAME
      </code>
      )
     </p>
    </li>
   </ul>
  </div>
  <p>
   <a class="link" href="truncate-table.html" title="15.1.37 TRUNCATE TABLE Statement">
    <code class="literal">
     TRUNCATE TABLE
    </code>
   </a>
   is not permitted
          for the
   <a class="link" href="performance-schema-setup-consumers-table.html" title="29.12.2.2 The setup_consumers Table">
    <code class="literal">
     setup_consumers
    </code>
   </a>
   table.
  </p>
 </div>
 <br/>
</div>
