The common state "go" of the MySQL process

Source: Internet
Author: User

Make a note for the convenience of inspection.

View the status of the MySQL process through show processlist, which has the following status on the State column:

Analyzing
The thread makes an analysis of the statistics of the MyISAM table (for example, ANALYZE table).
Checking Permissions
The thread checks whether the server has the required permissions to execute the statement.
Checking Table
The thread is performing a table check operation.
Cleaning up
the thread processes a command and is preparing to free memory and reset certain state variables.
Closing Tables
The thread changes the data in the table to disk and closes the table used.
converting HEAP to MyISAM
The thread transforms the internal temporary table memory table into the disk MyISAM table.
Copy to TMP table
The line is impersonating is processing an ALTER TABLE statement.
Copying to Group table
If the statement has different order by and group by criteria, sort by group and copy to a temporary table.
Copying to TMP table
The server replicates to the in-memory staging table.
Copying to TMP table on disk
The server replicates to a temporary table on disk.
Creating Index
line is impersonating in processing alter TABLE ... ENABLE KEYS.
Creating Sort Index
Line is impersonating is working with a select, which is resolved using an internal temp table.
Creating Table
the thread creates a table, which includes creating a temporary table.
Creating tmp table
the thread creates a temporary table in memory or on disk. If the table is created in memory but is later converted to a table on a disk, the operation status is copying to TMP table on disk.
deleting from Main Table
the server is performing the first part of multiple table deletions. It can only be removed from the first table, and the columns are saved and removed from the other table (reference) offset.
deleting from reference tables
The server is performing the second part of multiple table deletions, removing the matching rows from the other tables.
Discard_or_import_tablespace
line is impersonating in processing an alter TABLE ... DISCARD tablespace or alter TABLE ... IMPORT tablespace statement.
End
This occurs at the end of the cleanup work, with Alter TABLE, CREATE VIEW, DELETE, INSERT, select, or UPDATE statements.
executing
The thread has started executing the statement.
Execution of Init_command
the Init_command system variable in which the thread is executing.
Freeing Items
the command that the thread has executed. Release some of the items that are completed in this state, involving the query cache. This state is usually followed by cleaning up.
Flushing Tables
The thread is executing flush TABLES, waiting for all threads to close their tables.
Fulltext Initialization
the server is ready to perform a full-text search of a natural language.
Init
Initialize the Alter TABLE, DELETE, INSERT, select, or UPDATE statement prior to the occurrence. The actions taken by the server in this state include flushing the InnoDB log in the binary log, and some query cache cleanup operations.
killed
someone sends a KILL thread statement, it should abort the kill flag at the next check.
Locked
the query is locked by another query.
Logging Slow Query
the thread is writing a statement that slows down the query log.
NULL
This state is used for the show processlist state.
Login
the initial state of the connection thread until the client has successfully authenticated.
Opening tables, Opening table
The thread tries to open a table. This should be very fast in the process unless there is a block to open.
Optimizing
The server performs the initial optimization of the query.
Preparing
This state appears in the query optimization process.
purging old relay logs
The thread is to eliminate unnecessary trunk log files.
Query End
This state occurs after the query is processed, but in this freeing items state.
Reading from net
The server reads the network packets.
Removing duplicates
the query uses select distinct in such a way. MySQL requires an additional stage to delete all duplicate rows before sending the results to the client.
removing TMP table
thread to remove the temporary table. If no temporary table is created, this state is not used.
Rename
line thread Name table.
Rename result table
The line is impersonating is processing an ALTER TABLE statement, creating a new table and renaming it to replace the original table.
Reopen Tables
the thread has a table lock and tries to reopen it.
Repair by sorting
Use the sort fix index.
Repair Done
repair complete.
Repair with Keycache
fixed using key cache. For MyISAM tables, the presence of this state should be increased by myisam_max_sort_file_size.
Rolling back
rolls back the transaction.
Saving State
Save the state.
searching rows for update
threads do the first phase before updating them to find all matching rows.
Sending Data
The thread processes a SELECT statement and sends the data to the client. Because operations that occur in this state tend to perform a large number of disk accesses (reads), the lifetime of the query is the longest running state.
Setup
The thread begins an ALTER TABLE operation.
Sorting for group
thread to do a grouping.
Sorting for order
The thread does order by ordering.
Sorting Index
a thread-sorted index for more efficient access to MyISAM table optimization operations.
sorting result
for the SELECT statement, this is creating sort index similar, but does not have a temporary table.
Statistics
The server calculates the statistics to develop a query execution plan. If a thread is in this state for a long time, it may be that the disk is performing other work.
System Lock
the thread is waiting for the internal or external System lock table. You can--skip-external-locking the lock option with an external system.
Table Lock
The thread requires an internal table lock.
Updating
the thread is looking for the row to update.
Updating Main Table
the server is performing the first part of a multi-table update, which updates only the first table.
Updating reference Tables
the server is performing the second part of a multi-table update.
User Lock
A thread request or request is called with a lock wait get_lock ().
waiting for release of Readlock
the thread is waiting for another thread's lock to be released.
waiting for tables, waiting for table
The thread gets a notification that the basic structure of a table has changed, and it needs to reopen the table to get the new structure. You must wait until all other threads have closed the table.
If another thread has flush TABLES or the table executes the following statement: Flush TABLES tbl_name, ALTER table, RENAME table, REPAIR table, ANALYZE table, OPTIMIZE TABLE.
Waiting on Cond
The thread is waiting for a condition.
waiting to get Readlock
the thread has issued a flush TABLES with the Read lock statement to obtain a global read lock and is waiting to acquire the lock.
Writing to net, waiting for net
The server writes a packet live waiting network, if a large number of occurrences please quickly check the database to the front-end network connection status and traffic.

The common state "go" of the MySQL process

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.