The tp_thread_group_stats table
reports statistics per thread group. There is one row per
group.
The tp_thread_group_stats table
has these columns:
TP_GROUP_IDThe thread group ID. This is a unique key within the table.
CONNECTIONS_STARTEDThe number of connections started.
CONNECTIONS_CLOSEDThe number of connections closed.
QUERIES_EXECUTEDThe number of statements executed. This number is incremented when a statement starts executing, not when it finishes.
QUERIES_QUEUEDThe 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 Section 7.6.3.3, “Thread Pool Operation”.
THREADS_STARTEDThe number of threads started.
PRIO_KICKUPSThe number of statements that have been moved from low-priority queue to high-priority queue based on the value of the
thread_pool_prio_kickup_timersystem 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. ForInnoDB, this most likely means deteriorating performance due to too many concurrent transactions..STALLED_QUERIES_EXECUTEDThe number of statements that have become defined as stalled due to executing for longer than the value of the
thread_pool_stall_limitsystem variable.BECOME_CONSUMER_THREADThe number of times thread have been assigned the consumer thread role.
BECOME_RESERVE_THREADThe number of times threads have been assigned the reserve thread role.
BECOME_WAITING_THREADThe 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.
WAKE_THREAD_STALL_CHECKERThe 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.
SLEEP_WAITSThe number of
THD_WAIT_SLEEPwaits. These occur when threads go to sleep (for example, by calling theSLEEP()function).DISK_IO_WAITSThe number of
THD_WAIT_DISKIOwaits. 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.ROW_LOCK_WAITSThe number of
THD_WAIT_ROW_LOCKwaits for release of a row lock by another transaction.GLOBAL_LOCK_WAITSThe number of
THD_WAIT_GLOBAL_LOCKwaits for a global lock to be released.META_DATA_LOCK_WAITSThe number of
THD_WAIT_META_DATA_LOCKwaits for a metadata lock to be released.TABLE_LOCK_WAITSThe number of
THD_WAIT_TABLE_LOCKwaits for a table to be unlocked that the statement needs to access.USER_LOCK_WAITSThe number of
THD_WAIT_USER_LOCKwaits for a special lock constructed by the user thread.BINLOG_WAITSThe number of
THD_WAIT_BINLOG_WAITSwaits for the binary log to become free.GROUP_COMMIT_WAITSThe number of
THD_WAIT_GROUP_COMMITwaits. These occur when a group commit must wait for the other parties to complete their part of a transaction.FSYNC_WAITSThe number of
THD_WAIT_SYNCwaits for a file sync operation.
The tp_thread_group_stats table
has these indexes:
Unique index on (
TP_GROUP_ID)
TRUNCATE TABLE is not permitted
for the tp_thread_group_stats
table.