Common statuses in output from show processlist:
· Checking table
The thread is performing an (automatic) Table check.
· Closing tables
This means that the thread is refreshing the changed table data and shutting down the used table. This should be a quick operation. If not, verify that your disk is not full and that the disk is not overloaded.
· Connect out
Connect to the slave server on the master server.
· Copying to TMP table on disk
The temporary result set is larger than tmp_table_size. The thread changes the temporary table format from the memory to the disk mode to save memory.
· Creating TMP table
The thread is creating a temporary table to maintain partial results.
· Deleting from main table
The server is executing the first part of multi-Table deletion and only deletes from the first table.
· Deleting from reference tables
The server is executing the second part of multi-Table deletion to delete matched rows from other tables.
· Flushing tables
The thread is executing flush tables and is waiting for all threads to close the table.
· Fulltext Initialization
The server is preparing to perform a natural language full text search.
· Killed
Someone has sent a kill command to the thread. Should be abandoned when marking the next check termination. This flag is checked in every major loop of MySQL, but in some cases, thread termination takes a short time. If the thread is locked by another thread, the stop operation takes effect as long as other threads are locked.
· Locked
The query is locked by other queries.
· Sending data
The thread is processing rows for the SELECT statement and sending data to the client.
· Sorting for group
The thread is being classified to meet the requirements of group.
· Sorting for order
The thread is being classified to meet the order by requirement.
· Opening tables
The thread is trying to open a table. This should be a very fast process, unless the open operation is blocked. For example, an alter table or lock TABLE statement can prevent opening a table until the statement is completed.
· Removing duplicates
The query is using select distinct. During use, MySQL cannot optimize different operations in the early stages. Therefore, MySQL requires an additional stage to cancel all the duplicate rows before sending the results to the client.
· Reopen table
The thread gets a table locked. However, after the table is locked, it is notified that the table structure below it has changed. It has released the lock, closed the table, and tried to open it again.
· Repair by sorting
The fix code is using a category to create an index.
· Repair with keycache
The fix code is using the key cache to create keywords one by one. This is much slower than classification.
· Searching rows for update
The thread is in the first stage to find all matched rows before updating. This is required if update is modifying the index used to find the relevant row.
· Sleeping
The thread is waiting for the client to send a new statement to it.
· System lock
The thread is waiting for an external system lock for the table. If you are not using multiple mysqld servers that are accessing the same table, you can use the -- skip-external-locking option to disable system locking.
· Upgrading lock
The insert delayed hypervisor is trying to get a table lock to insert rows.
· Updating
The thread is searching for rows and updating these rows.
· User lock
The thread is waiting for get_lock ().
· Waiting for tables
The thread gets a notification that the underlying structure of the table has changed and needs to be retyped.