8.12.5 Examining Thread Information

8.12.5.1 Thread Command Values
8.12.5.2 General Thread States
8.12.5.3 Delayed-Insert Thread States
8.12.5.4 Query Cache Thread States
8.12.5.5 Replication Master Thread States
8.12.5.6 Replication Slave I/O Thread States
8.12.5.7 Replication Slave SQL Thread States
8.12.5.8 Replication Slave Connection Thread States
8.12.5.9 MySQL Cluster Thread States
8.12.5.10 Event Scheduler Thread States

When you are attempting to ascertain what your MySQL server is doing, it can be helpful to examine the process list, which is the set of threads currently executing within the server. Process list information is available from these sources:

Access to threads does not require a mutex and has minimal impact on server performance. INFORMATION_SCHEMA.PROCESSLIST and SHOW PROCESSLIST have negative performance consequences because they require a mutex. threads also shows information about background threads, which INFORMATION_SCHEMA.PROCESSLIST and SHOW PROCESSLIST do not. This means that threads can be used to monitor activity the other thread information sources cannot.

You can always view information about your own threads. To view information about threads being executed for other accounts, you must have the PROCESS privilege.

Each process list entry contains several pieces of information:

The following sections list the possible Command values, and State values grouped by category. The meaning for some of these values is self-evident. For others, additional description is provided.