The tp_connections table contains one row
per connection managed by the Thread Pool plugin. Each row
provides information about the current state of a thread pool
connection.
The tp_connections table contains the
following rows:
CONNECTION_IDThe connection ID as reported by
SELECTCONNECTION_ID().TP_GROUP_IDThe index of the thread group in the global array. This column and
TP_PROCESSING_THREAD_NUMBERserve as a foreign key into thetp_thread_statetable.TP_PROCESSING_THREAD_NUMBERThis may be NULL if no thread is currently attached to the connection.
THREAD_IDThe Performance Schema thread ID.
STATEThe connection state; this is one of
Established,Armed,Queued,Waiting for Credit,Attached,Expired, orKilled.ACTIVE_FLAGWhen this is
0, the connection is not attached to any worker thread.KILLED_STATEReports the current stage in the process of killing the connection.
CLEANUP_STATEReports the current stage in the cleanup process when closing the connection.
TIME_OF_LAST_EVENT_COMPLETIONTimestamp showing when the connection last processed a request.
TIME_OF_EXPIRYTimestamp showing when an idle connection will expire if no new request arrives before then; this is
NULLwhen the thread is currently processing a request.TIME_OF_ADDTimestamp showing when the connection was added to the thread pool's connection request queue.
TIME_OF_POPTimestamp showing when the connection was dequeued (popped) from the queue by a connection handler thread.
TIME_OF_ARMTimestamp showing when the connection file descriptor was last added to the set monitored by
poll()orepoll().CONNECT_HANDLER_INDEXThe index of the connection handler thread in the group which processed the connection request; a higher number means the connection load has triggered the creation of additional connection handler threads.
TYPEThe connection type; this is one of
User,Admin_interfaceorAdmin_privilege;Admin_privilegemeans that this connection had been using the normal interface, but was placed in theadmingroup due to the user having theTP_CONNECTION_ADMINprivilege.DIRECT_QUERY_EVENTSThe number of queries executed directly by this connection.
QUEUED_QUERY_EVENTSThe number of queued queries executed by this connection.
TIME_OF_EVENT_ARRIVALA timestamp showing when
poll_wait()returns with an event for the connection; this value is needed to calculateMANAGEMENT_TIME.MANAGEMENT_TIMEThe accumulated time between the return from waiting on file descriptors; this includes the time spent queued for queries which are not executed directly.