<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="performance-schema-setup-threads-table">
      </a>
      29.12.2.5 The setup_threads Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045073677184">
  </a>
  <a class="indexterm" name="idm46045073675696">
  </a>
  <p>
   The
   <a class="link" href="performance-schema-setup-threads-table.html" title="29.12.2.5 The setup_threads Table">
    <code class="literal">
     setup_threads
    </code>
   </a>
   table lists
          instrumented thread classes. It exposes thread class names and
          attributes:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa18186981"><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_threads\G
<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> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
         NAME<span class="token punctuation">:</span> thread/performance_schema/setup
      ENABLED<span class="token punctuation">:</span> YES
      HISTORY<span class="token punctuation">:</span> YES
   PROPERTIES<span class="token punctuation">:</span> singleton
   VOLATILITY<span class="token punctuation">:</span> 0
DOCUMENTATION<span class="token punctuation">:</span> NULL
...
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 4. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
         NAME<span class="token punctuation">:</span> thread/sql/main
      ENABLED<span class="token punctuation">:</span> YES
      HISTORY<span class="token punctuation">:</span> YES
   PROPERTIES<span class="token punctuation">:</span> singleton
   VOLATILITY<span class="token punctuation">:</span> 0
DOCUMENTATION<span class="token punctuation">:</span> NULL
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 5. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
         NAME<span class="token punctuation">:</span> thread/sql/one_connection
      ENABLED<span class="token punctuation">:</span> YES
      HISTORY<span class="token punctuation">:</span> YES
   PROPERTIES<span class="token punctuation">:</span> user
   VOLATILITY<span class="token punctuation">:</span> 0
DOCUMENTATION<span class="token punctuation">:</span> NULL
...
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 10. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
         NAME<span class="token punctuation">:</span> thread/sql/event_scheduler
      ENABLED<span class="token punctuation">:</span> YES
      HISTORY<span class="token punctuation">:</span> YES
   PROPERTIES<span class="token punctuation">:</span> singleton
   VOLATILITY<span class="token punctuation">:</span> 0
DOCUMENTATION<span class="token punctuation">:</span> NULL</span></code></pre>
  </div>
  <p>
   The
   <a class="link" href="performance-schema-setup-threads-table.html" title="29.12.2.5 The setup_threads Table">
    <code class="literal">
     setup_threads
    </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 instrument name. Thread instruments begin with
      <code class="literal">
       thread
      </code>
      (for example,
      <code class="literal">
       thread/sql/parser_service
      </code>
      or
      <code class="literal">
       thread/performance_schema/setup
      </code>
      ).
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ENABLED
      </code>
     </p>
     <p>
      Whether the instrument is enabled. The value is
      <code class="literal">
       YES
      </code>
      or
      <code class="literal">
       NO
      </code>
      . This
              column can be modified, although setting
      <code class="literal">
       ENABLED
      </code>
      has no effect for threads that
              are already running.
     </p>
     <p>
      For background threads, setting the
      <code class="literal">
       ENABLED
      </code>
      value controls whether
      <code class="literal">
       INSTRUMENTED
      </code>
      is set to
      <code class="literal">
       YES
      </code>
      or
      <code class="literal">
       NO
      </code>
      for
              threads that are subsequently created for this instrument
              and listed in the
      <a class="link" href="performance-schema-threads-table.html" title="29.12.22.8 The threads Table">
       <code class="literal">
        threads
       </code>
      </a>
      table. For foreground threads, this column has no effect;
              the
      <a class="link" href="performance-schema-setup-actors-table.html" title="29.12.2.1 The setup_actors Table">
       <code class="literal">
        setup_actors
       </code>
      </a>
      table takes
              precedence.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       HISTORY
      </code>
     </p>
     <p>
      Whether to log historical events for the instrument. The
              value is
      <code class="literal">
       YES
      </code>
      or
      <code class="literal">
       NO
      </code>
      .
              This column can be modified, although setting
      <code class="literal">
       HISTORY
      </code>
      has no effect for threads that
              are already running.
     </p>
     <p>
      For background threads, setting the
      <code class="literal">
       HISTORY
      </code>
      value controls whether
      <code class="literal">
       HISTORY
      </code>
      is set to
      <code class="literal">
       YES
      </code>
      or
      <code class="literal">
       NO
      </code>
      for
              threads that are subsequently created for this instrument
              and listed in the
      <a class="link" href="performance-schema-threads-table.html" title="29.12.22.8 The threads Table">
       <code class="literal">
        threads
       </code>
      </a>
      table. For foreground threads, this column has no effect;
              the
      <a class="link" href="performance-schema-setup-actors-table.html" title="29.12.2.1 The setup_actors Table">
       <code class="literal">
        setup_actors
       </code>
      </a>
      table takes
              precedence.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       PROPERTIES
      </code>
     </p>
     <p>
      The instrument properties. This column uses the
      <a class="link" href="set.html" title="13.3.6 The SET Type">
       <code class="literal">
        SET
       </code>
      </a>
      data type, so multiple
              flags from the following list can be set per instrument:
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         <code class="literal">
          singleton
         </code>
         : The instrument has a
                  single instance. For example, there is only one thread
                  for the
         <code class="literal">
          thread/sql/main
         </code>
         instrument.
        </p>
       </li>
       <li class="listitem">
        <p>
         <code class="literal">
          user
         </code>
         : The instrument is directly
                  related to user workload (as opposed to system
                  workload). For example, threads such as
         <code class="literal">
          thread/sql/one_connection
         </code>
         executing
                  a user session have the
         <code class="literal">
          user
         </code>
         property to differentiate them from system threads.
        </p>
       </li>
      </ul>
     </div>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       VOLATILITY
      </code>
     </p>
     <p>
      The instrument volatility. This column has the same
              meaning as in the
      <a class="link" href="performance-schema-setup-instruments-table.html" title="29.12.2.3 The setup_instruments Table">
       <code class="literal">
        setup_instruments
       </code>
      </a>
      table. See
      <a class="xref" href="performance-schema-setup-instruments-table.html" title="29.12.2.3 The setup_instruments Table">
       Section 29.12.2.3, “The setup_instruments Table”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       DOCUMENTATION
      </code>
     </p>
     <p>
      A string describing the instrument purpose. The value is
      <code class="literal">
       NULL
      </code>
      if no description is available.
     </p>
    </li>
   </ul>
  </div>
  <p>
   The
   <a class="link" href="performance-schema-setup-threads-table.html" title="29.12.2.5 The setup_threads Table">
    <code class="literal">
     setup_threads
    </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-threads-table.html" title="29.12.2.5 The setup_threads Table">
    <code class="literal">
     setup_threads
    </code>
   </a>
   table.
  </p>
 </div>
 <br/>
</div>
