<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="performance-schema-tp-thread-group-stats-table">
      </a>
      29.12.16.3 The tp_thread_group_stats Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045069770432">
  </a>
  <a class="indexterm" name="idm46045069768928">
  </a>
  <p>
   The
   <a class="link" href="performance-schema-tp-thread-group-stats-table.html" title="29.12.16.3 The tp_thread_group_stats Table">
    <code class="literal">
     tp_thread_group_stats
    </code>
   </a>
   table
          reports statistics per thread group. There is one row per
          group.
  </p>
  <p>
   The
   <a class="link" href="performance-schema-tp-thread-group-stats-table.html" title="29.12.16.3 The tp_thread_group_stats Table">
    <code class="literal">
     tp_thread_group_stats
    </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">
       TP_GROUP_ID
      </code>
     </p>
     <p>
      The thread group ID. This is a unique key within the
              table.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       CONNECTIONS_STARTED
      </code>
     </p>
     <p>
      The number of connections started.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       CONNECTIONS_CLOSED
      </code>
     </p>
     <p>
      The number of connections closed.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       QUERIES_EXECUTED
      </code>
     </p>
     <p>
      The number of statements executed. This number is
              incremented when a statement starts executing, not when it
              finishes.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       QUERIES_QUEUED
      </code>
     </p>
     <p>
      The number of statements received that were queued for
              execution. This does not count statements that the thread
              group was able to begin executing immediately without
              queuing, which can happen under the conditions described
              in
      <a class="xref" href="thread-pool-operation.html" title="7.6.3.3 Thread Pool Operation">
       Section 7.6.3.3, “Thread Pool Operation”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       THREADS_STARTED
      </code>
     </p>
     <p>
      The number of threads started.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       PRIO_KICKUPS
      </code>
     </p>
     <p>
      The number of statements that have been moved from
              low-priority queue to high-priority queue based on the
              value of the
      <a class="link" href="server-system-variables.html#sysvar_thread_pool_prio_kickup_timer">
       <code class="literal">
        thread_pool_prio_kickup_timer
       </code>
      </a>
      system variable. If this number increases quickly,
              consider increasing the value of that variable. A quickly
              increasing counter means that the priority system is not
              keeping transactions from starting too early. For
      <a class="link" href="innodb-storage-engine.html" title="Chapter 17 The InnoDB Storage Engine">
       <code class="literal">
        InnoDB
       </code>
      </a>
      , this most likely
              means deteriorating performance due to too many concurrent
              transactions..
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       STALLED_QUERIES_EXECUTED
      </code>
     </p>
     <p>
      The number of statements that have become defined as
              stalled due to executing for longer than the value of the
      <a class="link" href="server-system-variables.html#sysvar_thread_pool_stall_limit">
       <code class="literal">
        thread_pool_stall_limit
       </code>
      </a>
      system variable.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       BECOME_CONSUMER_THREAD
      </code>
     </p>
     <p>
      The number of times thread have been assigned the consumer
              thread role.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       BECOME_RESERVE_THREAD
      </code>
     </p>
     <p>
      The number of times threads have been assigned the reserve
              thread role.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       BECOME_WAITING_THREAD
      </code>
     </p>
     <p>
      The number of times threads have been assigned the waiter
              thread role. When statements are queued, this happens very
              often, even in normal operation, so rapid increases in
              this value are normal in the case of a highly loaded
              system where statements are queued up.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       WAKE_THREAD_STALL_CHECKER
      </code>
     </p>
     <p>
      The number of times the stall check thread decided to wake
              or create a thread to possibly handle some statements or
              take care of the waiter thread role.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       SLEEP_WAITS
      </code>
     </p>
     <p>
      The number of
      <code class="literal">
       THD_WAIT_SLEEP
      </code>
      waits.
              These occur when threads go to sleep (for example, by
              calling the
      <a class="link" href="miscellaneous-functions.html#function_sleep">
       <code class="literal">
        SLEEP()
       </code>
      </a>
      function).
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       DISK_IO_WAITS
      </code>
     </p>
     <p>
      The number of
      <code class="literal">
       THD_WAIT_DISKIO
      </code>
      waits.
              These occur when threads perform disk I/O that is likely
              to not hit the file system cache. Such waits occur when
              the buffer pool reads and writes data to disk, not for
              normal reads from and writes to files.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ROW_LOCK_WAITS
      </code>
     </p>
     <p>
      The number of
      <code class="literal">
       THD_WAIT_ROW_LOCK
      </code>
      waits
              for release of a row lock by another transaction.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       GLOBAL_LOCK_WAITS
      </code>
     </p>
     <p>
      The number of
      <code class="literal">
       THD_WAIT_GLOBAL_LOCK
      </code>
      waits for a global lock to be released.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       META_DATA_LOCK_WAITS
      </code>
     </p>
     <p>
      The number of
      <code class="literal">
       THD_WAIT_META_DATA_LOCK
      </code>
      waits for a metadata lock to be released.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       TABLE_LOCK_WAITS
      </code>
     </p>
     <p>
      The number of
      <code class="literal">
       THD_WAIT_TABLE_LOCK
      </code>
      waits
              for a table to be unlocked that the statement needs to
              access.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       USER_LOCK_WAITS
      </code>
     </p>
     <p>
      The number of
      <code class="literal">
       THD_WAIT_USER_LOCK
      </code>
      waits
              for a special lock constructed by the user thread.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       BINLOG_WAITS
      </code>
     </p>
     <p>
      The number of
      <code class="literal">
       THD_WAIT_BINLOG_WAITS
      </code>
      waits for the binary log to become free.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       GROUP_COMMIT_WAITS
      </code>
     </p>
     <p>
      The number of
      <code class="literal">
       THD_WAIT_GROUP_COMMIT
      </code>
      waits. These occur when a group commit must wait for the
              other parties to complete their part of a transaction.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       FSYNC_WAITS
      </code>
     </p>
     <p>
      The number of
      <code class="literal">
       THD_WAIT_SYNC
      </code>
      waits for a
              file sync operation.
     </p>
    </li>
   </ul>
  </div>
  <p>
   The
   <a class="link" href="performance-schema-tp-thread-group-stats-table.html" title="29.12.16.3 The tp_thread_group_stats Table">
    <code class="literal">
     tp_thread_group_stats
    </code>
   </a>
   table
          has these indexes:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Unique index on (
      <code class="literal">
       TP_GROUP_ID
      </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-tp-thread-group-stats-table.html" title="29.12.16.3 The tp_thread_group_stats Table">
    <code class="literal">
     tp_thread_group_stats
    </code>
   </a>
   table.
  </p>
 </div>
 <br/>
</div>
