Documentation Home
MySQL 8.4 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 39.9Mb
PDF (A4) - 40.0Mb
Man Pages (TGZ) - 258.3Kb
Man Pages (Zip) - 365.3Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb The tp_thread_group_state Table

The tp_thread_group_state table has one row per thread group in the thread pool. Each row provides information about the current state of a group.

The tp_thread_group_state table has these columns:


    The thread group ID. This is a unique key within the table.


    The number of consumer threads. There is at most one thread ready to start executing if the active threads become stalled or blocked.


    The number of threads in the reserved state. This means that they are not started until there is a need to wake a new thread and there is no consumer thread. This is where most threads end up when the thread group has created more threads than needed for normal operation. Often a thread group needs additional threads for a short while and then does not need them again for a while. In this case, they go into the reserved state and remain until needed again. They take up some extra memory resources, but no extra computing resources.


    The number of threads that are processing or waiting to process connection initialization and authentication. There can be a maximum of four connection threads per thread group; these threads expire after a period of inactivity.


    The number of connections using this thread group.


    The number of statements waiting in the high-priority queue.


    The number of statements waiting in the low-priority queue. These are the initial statements for transactions that have not started, so they also represent queued transactions.


    The value of the thread_pool_stall_limit system variable for the thread group. This is the same value for all thread groups.


    The value of the thread_pool_prio_kickup_timer system variable for the thread group. This is the same value for all thread groups.


    The value of the thread_pool_algorithm system variable for the thread group. This is the same value for all thread groups.


    The number of threads started in the thread pool as part of this thread group.


    The number of threads active in executing statements.


    The number of stalled statements in the thread group. A stalled statement could be executing, but from a thread pool perspective it is stalled and making no progress. A long-running statement quickly ends up in this category.


    If there is a thread handling the polling of statements in the thread group, this specifies the thread number within this thread group. It is possible that this thread could be executing a statement.


    How long in milliseconds the oldest queued statement has been waiting for execution.


    The maximum thread ID of the threads in the group. This is the same as MAX(TP_THREAD_NUMBER) for the threads when selected from the tp_thread_state table. That is, these two queries are equivalent:

    FROM tp_thread_group_state;
    FROM tp_thread_state GROUP BY TP_GROUP_ID;

    The effective max_transactions_limit_per_tg value for the group.


    The number of worker threads in the group.


    The point in time when the thread was last created.


    The number of inactive connection handler threads.


    The number of threads in an active transaction, which must be less than thread_pool_max_transactions_limit; this is set only when thread_pool_max_transactions_limit is not 0.


    same as num_query_threads, but used for different purposes?


    A timestamp showing the earliest point in time when a connection is expected to expire.

The tp_thread_group_state table has one index; this is a unique index on the TP_GROUP_ID column.

TRUNCATE TABLE is not permitted for the tp_thread_group_state table.