threads_after_create |
integer |
当线程在创建表的函数末尾处创建表时(包括内部临时表),发生该状态。即使由于某些错误无法创建表,也会使用该状态。 |
threads_altering_table |
integer |
线程正在对一个MyISAM表处理ALTER TABLE … ENABLE KEYS |
threads_analyzing |
integer |
线程正在计算MyISAM表键分布(例如,ANALYZE TABLE) |
threads_checking_permissions |
integer |
线程正在检查服务器是否具有执行某个语句所需的权限 |
threads_checking_table |
integer |
线程正在执行一个表检查操作 |
threads_cleaning_up |
integer |
线程已经处理完一个命令,并准备释放内存和重置某些的状态变量 |
threads_closing_tables |
integer |
线程正在将更改的表数据flush到磁盘并关闭已使用的表 |
threads_converting_heap_to_myisam |
integer |
线程正在将内部临时表从内存转换到MyISAM表 |
threads_copying_to_tmp_table |
integer |
服务器正在复制数据到临时表 |
threads_creating_sort_index |
integer |
线程正在处理一个使用内部临时表解决问题的SELECT语句 |
threads_creating_table |
integer |
线程正在创建一个表,包括创建临时表 |
threads_creating_tmp_table |
integer |
线程正在内存或磁盘上创建一个临时表 |
threads_deleting |
integer |
服务器正在执行删除表格的操作 |
threads_end |
integer |
该状态发生在ALTER TABLE、CREATE VIEW、DELETE、INSERT、SELECT或UPDATE语句的结束,但在这些语句的清理之前 |
threads_executing |
integer |
线程已经开始执行一个语句 |
threads_execution_of_init_command |
integer |
线程正在执行在系统变量init_command中的语句 |
threads_flushing_tables |
integer |
线程正在刷新磁盘 |
threads_freeing_items |
integer |
线程已经执行完一个命令,通常在该状态之后是状态“cleaning up” |
threads_fulltext_initialization |
integer |
服务器正准备执行一个自然语言全文搜索 |
threads_idle |
integer |
线程调用了SLEEP() |
threads_init |
integer |
该状态发生在ALTER TABLE、DELETE、INSERT、SELECT或UPDATE语句的初始化之前。服务器在刷新二进制日志和InnoDB日志的时候也会处于这个状态。 |
threads_killed |
integer |
发送KILL语句到线程后,当检查到kill标志时,线程会终止。该标志在每个MySQL的主循环中都会被检查,但是在某些情况下,线程死亡可能还需要很短的时间。如果线程被其他线程锁定,那么一旦其他线程释放锁后,kill将立即生效。
|
threads_logging_slow_query |
integer |
线程正在向慢查询日志(slow-query log)写入一个语句 |
threads_login |
integer |
连接线程的初始状态,直到客户端成功通过身份验证 |
threads_manage_keys |
integer |
服务器开启或关闭表索引 |
threads_opening_tables |
integer |
线程正在尝试打开一个表 |
threads_optimizing |
integer |
服务器正在执行查询的初始优化 |
threads_preparing |
integer |
该状态发生在查询优化期间 |
threads_reading_from_net |
integer |
服务器正在从网络读取数据 |
threads_removing_duplicates |
integer |
使用SELECT DISTINCT的查询使得MySQL无法在早期优化distinct操作。因此,在将结果发送给客户端之前,MySQL需要额外的阶段来删除所有重复的行。 |
threads_removing_tmp_table |
integer |
线程在处理SELECT语句后正在删除一个内部临时表。如果没有创建临时表,则不使用此状态。 |
threads_reopen_tables |
integer |
线程得到了表的锁,但在获得锁之后,底层表结构发生了变化。它释放了锁,关闭了表,并试图重新打开它。 |
threads_repair_by_sorting |
integer |
修复代码正在使用排序来创建索引 |
threads_repair_done |
integer |
线程已经完成MyISAM表的多线程修复 |
threads_repair_with_keycache |
integer |
修复代码正在通过密钥缓存逐个创建密钥。这比repair by sorting慢很多。 |
threads_replication_master |
integer |
replication master的线程状态 |
threads_rolling_back |
integer |
线程正在回滚事务 |
threads_searching_rows_for_update |
integer |
线程正在进行第一阶段,在更新之前查找所有匹配的行。如果UPDATE正在更改用于查找相关行的索引,则必须执行此操作。 |
threads_sending_data |
integer |
线程正在读取和处理SELECT语句的行 ,并将数据发送到客户端。因为在这种状态下发生的操作倾向于执行大量的磁盘访问(读取),所以在一个查询的整个生命周期中,它通常是运行时间最长的状态。 |
threads_sorting_for_group |
integer |
线程正在执行排序以满足GROUP BY |
threads_sorting_for_order |
integer |
线程正在执行排序以满足ORDER BY |
threads_sorting_index |
integer |
线程正在排序索引页面,以便在MyISAM表优化操作期间实现更高效的访问 |
threads_sorting_result |
integer |
对于一个SELECT语句,这类似于creating sort index,但是面向非临时表。 |
threads_statistics |
integer |
服务器正在计算统计信息来开发一个查询执行计划。如果一个线程长时间处于这种状态,那么服务器可能是磁盘绑定执行其它工作。 |
threads_updating |
integer |
线程正准备更新表或者正在更新表 |
threads_waiting_for_lock |
integer |
线程正在等待锁 |
threads_waiting_for_table_flush |
integer |
线程正在执行FLUSH TABLES并等待所有线程关闭它们的表,或者线程被告知一个表的底层结构已经发生改变,它需要重新打开该表获得新的结构。但是,要重新打开表,必须等到所有其它线程已经关闭相关的表。 |
threads_waiting_for_tables |
integer |
线程被告知一个表的底层结构已经发生改变,它需要重新打开该表获得新的结构。但是,要重新打开表,必须等到所有其它线程已经关闭相关的表。 这种情况发生在如果另一个线程在该表上已使用FLUSH TABLES或下面的语句之一:FLUSH TABLES、ALTER TABLE、RENAME TABLE、REPAIR TABLE、ANALYZE TABLE或OPTIMIZE TABLE。 |
threads_waiting_on_cond |
integer |
线程正在等待condition变为true的通用状态。没有具体的状态信息可用。 |
threads_writing_to_net |
integer |
服务器正在向网络写入数据包 |
threads_other |
integer |
其它状态 |
评论