<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="performance-schema-setup-actors-table">
      </a>
      29.12.2.1 The setup_actors Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045073951328">
  </a>
  <a class="indexterm" name="idm46045073949840">
  </a>
  <p>
   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 contains
          information that determines whether to enable monitoring and
          historical event logging for new foreground server threads
          (threads associated with client connections). This table has a
          maximum size of 100 rows by default. To change the table size,
          modify the
   <a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_setup_actors_size">
    <code class="literal">
     performance_schema_setup_actors_size
    </code>
   </a>
   system variable at server startup.
  </p>
  <p>
   For each new foreground thread, the Performance Schema matches
          the user and host for the thread against the rows of 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. If a row from
          that table matches, its
   <code class="literal">
    ENABLED
   </code>
   and
   <code class="literal">
    HISTORY
   </code>
   column values are used to set the
   <code class="literal">
    INSTRUMENTED
   </code>
   and
   <code class="literal">
    HISTORY
   </code>
   columns, respectively, of 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 row for the thread.
          This enables instrumenting and historical event logging to be
          applied selectively per host, user, or account (user and host
          combination). If there is no match, the
   <code class="literal">
    INSTRUMENTED
   </code>
   and
   <code class="literal">
    HISTORY
   </code>
   columns for the thread are set to
   <code class="literal">
    NO
   </code>
   .
  </p>
  <p>
   For background threads, there is no associated user.
   <code class="literal">
    INSTRUMENTED
   </code>
   and
   <code class="literal">
    HISTORY
   </code>
   are
   <code class="literal">
    YES
   </code>
   by default and
   <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>
   is not consulted.
  </p>
  <p>
   The initial contents of 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 match any user
          and host combination, so monitoring and historical event
          collection are enabled by default for all foreground threads:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa48512846"><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_actors<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>
<span class="token output"><span class="token punctuation">|</span> HOST <span class="token punctuation">|</span> USER <span class="token punctuation">|</span> ROLE <span class="token punctuation">|</span> ENABLED <span class="token punctuation">|</span> HISTORY <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>
<span class="token output"><span class="token punctuation">|</span> %    <span class="token punctuation">|</span> %    <span class="token punctuation">|</span> %    <span class="token punctuation">|</span> YES     <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></code></pre>
  </div>
  <p>
   For information about how to use 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 to affect
          event monitoring, see
   <a class="xref" href="performance-schema-thread-filtering.html" title="29.4.6 Pre-Filtering by Thread">
    Section 29.4.6, “Pre-Filtering by Thread”
   </a>
   .
  </p>
  <p>
   Modifications to 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 affect only foreground threads created subsequent to the
          modification, not existing threads. To affect existing
          threads, modify the
   <code class="literal">
    INSTRUMENTED
   </code>
   and
   <code class="literal">
    HISTORY
   </code>
   columns of
   <a class="link" href="performance-schema-threads-table.html" title="29.12.22.8 The threads Table">
    <code class="literal">
     threads
    </code>
   </a>
   table rows.
  </p>
  <p>
   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 has these
          columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       HOST
      </code>
     </p>
     <p>
      The host name. This should be a literal name, or
      <code class="literal">
       '%'
      </code>
      to mean
      <span class="quote">
       “
       <span class="quote">
        any host.
       </span>
       ”
      </span>
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       USER
      </code>
     </p>
     <p>
      The user name. This should be a literal name, or
      <code class="literal">
       '%'
      </code>
      to mean
      <span class="quote">
       “
       <span class="quote">
        any user.
       </span>
       ”
      </span>
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ROLE
      </code>
     </p>
     <p>
      Unused.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ENABLED
      </code>
     </p>
     <p>
      Whether to enable instrumentation for foreground threads
              matched by the row. The value is
      <code class="literal">
       YES
      </code>
      or
      <code class="literal">
       NO
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       HISTORY
      </code>
     </p>
     <p>
      Whether to log historical events for foreground threads
              matched by the row. The value is
      <code class="literal">
       YES
      </code>
      or
      <code class="literal">
       NO
      </code>
      .
     </p>
    </li>
   </ul>
  </div>
  <p>
   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 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">
       HOST
      </code>
      ,
      <code class="literal">
       USER
      </code>
      ,
      <code class="literal">
       ROLE
      </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 permitted for
          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. It
          removes the rows.
  </p>
 </div>
 <br/>
</div>
