performance_schema详解一

1、什么是performance_schema

成都创新互联专业为企业提供钢城网站建设、钢城做网站、钢城网站设计、钢城网站制作等企业网站建设、网页设计与制作、钢城企业网站模板建站服务,十余年钢城做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。

MySQL的performance schema 用于监控MySQL server在一个较低级别的运行过程中的资源消耗、资源等待等情况,它具有以下特点:

a、提供了一种在数据库运行时实时检查server的内部执行情况的方法。performance_schema 数据库中的表使用performance_schema存储引擎。该数据库主要关注数据库运行过程中的性能相关的数据,与information_schema不同,information_schema主要关注server运行过程中的元数据信息。

b、performance_schema通过监视server的事件来实现监视server内部运行情况, “事件”就是server内部活动中所做的任何事情以及对应的时间消耗,利用这些信息来判断server中的相关资源消耗在了哪里?一般来说,事件可以是函数调用、操作系统的等待、SQL语句执行的阶段(如sql语句执行过程中的parsing 或 sorting阶段)或者整个SQL语句与SQL语句集合。事件的采集可以方便的提供server中的相关存储引擎对磁盘文件、表I/O、表锁等资源的同步调用信息。

c、performance_schema中的事件与写入二进制日志中的事件(描述数据修改的events)、事件计划调度程序(这是一种存储程序)的事件不同。performance_schema中的事件记录的是server执行某些活动对某些资源的消耗、耗时、这些活动执行的次数等情况。

d、performance_schema中的事件只记录在本地server的performance_schema中,其下的这些表中数据发生变化时不会被写入binlog中,也不会通过复制机制被复制到其他server中。

e、当前活跃事件、历史事件和事件摘要相关的表中记录的信息。能提供某个事件的执行次数、使用时长。进而可用于分析某个特定线程、特定对象(如mutex或file)相关联的活动。

f、performance_schema存储引擎使用server源代码中的“检测点”来实现事件数据的收集。对于performance_schema实现机制本身的代码没有相关的单独线程来检测,这与其他功能(如复制或事件计划程序)不同。

g、收集的事件数据存储在performance_schema数据库的表中。这些表可以使用SELECT语句查询,也可以使用SQL语句更新performance_schema数据库中的表记录(如动态修改performance_schema的setup_*开头的几个配置表,但要注意:配置表的更改会立即生效,这会影响数据收集)。

h、performance_schema的表中的数据不会持久化存储在磁盘中,而是保存在内存中,一旦服务器重启,这些数据会丢失(包括配置表在内的整个performance_schema下的所有数据)。

i、MySQL支持的所有平台中事件监控功能都可用,但不同平台中用于统计事件时间开销的计时器类型可能会有所差异。

performance_schema实现机制遵循以下设计目标:

启用performance_schema不会导致server的行为发生变化。例如,它不会改变线程调度机制,不会导致查询执行计划(如EXPLAIN)发生变化。

启用performance_schema之后,server会持续不间断地监测,开销很小。不会导致server不可用。

在该实现机制中没有增加新的关键字或语句,解析器不会变化。

即使performance_schema的监测机制在内部对某事件执行监测失败,也不会影响server正常运行。

如果在开始收集事件数据时碰到有其他线程正在针对这些事件信息进行查询,那么查询会优先执行事件数据的收集,因为事件数据的收集是一个持续不断的过程,而检索(查询)这些事件数据仅仅只是在需要查看的时候才进行检索。也可能某些事件数据永远都不会去检索。

需要很容易地添加新的instruments监测点。

instruments(事件采集项)代码版本化:如果instruments的代码发生了变更,旧的instruments代码还可以继续工作。

注意:MySQL sys schema是一组对象(包括相关的视图、存储过程和函数),可以方便地访问performance_schema收集的数据。同时检索的数据可读性也更高(例如:performance_schema中的时间单位是皮秒,经过sys schema查询时会转换为可读的us,ms,s,min,hour,day等单位),sys schem在5.7.x版本默认安装。

2、performance_schema使用快速入门

2.1检查当前数据库版本是否支持

performance_schema被视为存储引擎。

root@[(none)]> select version();

+------------+

| version() |

+------------+

| 5.7.21-log |

+------------+

1 row in set (0.00 sec)

root@[(none)]> select engine,support from information_schema.engines where engine='PERFORMANCE_SCHEMA';

+--------------------+---------+

| engine | support |

+--------------------+---------+

| PERFORMANCE_SCHEMA | YES |

+--------------------+---------+

1 row in set (0.00 sec)

root@[(none)]> show engines;

+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+

| Engine | Support | Comment | Transactions | XA | Savepoints |

+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+

| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |

| InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |

| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |

| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |

| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |

| ARCHIVE | YES | Archive storage engine | NO | NO | NO |

| MyISAM | YES | MyISAM storage engine | NO | NO | NO |

| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |

| CSV | YES | CSV storage engine | NO | NO | NO |

+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+

9 rows in set (0.00 sec)

root@[(none)]> show variables like 'performance_schema';

+--------------------+-------+

| Variable_name | Value |

+--------------------+-------+

| performance_schema | ON |

+--------------------+-------+

1 row in set (0.01 sec)

该参数为只读参数,需要在实例启动之前设置才生效,performance_schema在5.7.x及其以上版本中默认启用(5.6.x及其以下版本默认关闭),如果要显式启用或关闭时,我们需要使用参数performance_schema=ON|OFF设置。

mysqld启动之后,通过如下语句查看performance_schema是否启用生效(值为ON表示performance_schema已初始化成功且可以使用了。如果值为OFF表示在启用performance_schema时发生某些错误。可以查看错误日志进行排查)。

可以使用select table_name from information_schema.tables where table_schema='performance_schema' and engine='performance_schema';查询哪些表使用performance_schema引擎,

或者直接在performance_schema库下用show tables;或直接使用show tables from performance_schema;语句来查询该库有哪些表。

root@[performance_schema]> show tables from performance_schema;

+------------------------------------------------------+

| Tables_in_performance_schema |

+------------------------------------------------------+

| accounts |

| cond_instances |

| events_stages_current |

| events_stages_history |

| events_stages_history_long |

| events_stages_summary_by_account_by_event_name |

| events_stages_summary_by_host_by_event_name |

| events_stages_summary_by_thread_by_event_name |

| events_stages_summary_by_user_by_event_name |

| events_stages_summary_global_by_event_name |

| events_statements_current |

| events_statements_history |

| events_statements_history_long |

| events_statements_summary_by_account_by_event_name |

| events_statements_summary_by_digest |

| events_statements_summary_by_host_by_event_name |

| events_statements_summary_by_program |

| events_statements_summary_by_thread_by_event_name |

| events_statements_summary_by_user_by_event_name |

| events_statements_summary_global_by_event_name |

| events_transactions_current |

| events_transactions_history |

| events_transactions_history_long |

| events_transactions_summary_by_account_by_event_name |

| events_transactions_summary_by_host_by_event_name |

| events_transactions_summary_by_thread_by_event_name |

| events_transactions_summary_by_user_by_event_name |

| events_transactions_summary_global_by_event_name |

| events_waits_current |

| events_waits_history |

| events_waits_history_long |

| events_waits_summary_by_account_by_event_name |

| events_waits_summary_by_host_by_event_name |

| events_waits_summary_by_instance |

| events_waits_summary_by_thread_by_event_name |

| events_waits_summary_by_user_by_event_name |

| events_waits_summary_global_by_event_name |

| file_instances |

| file_summary_by_event_name |

| file_summary_by_instance |

| global_status |

| global_variables |

| host_cache |

| hosts |

| memory_summary_by_account_by_event_name |

| memory_summary_by_host_by_event_name |

| memory_summary_by_thread_by_event_name |

| memory_summary_by_user_by_event_name |

| memory_summary_global_by_event_name |

| metadata_locks |

| mutex_instances |

| objects_summary_global_by_type |

| performance_timers |

| prepared_statements_instances |

| replication_applier_configuration |

| replication_applier_status |

| replication_applier_status_by_coordinator |

| replication_applier_status_by_worker |

| replication_connection_configuration |

| replication_connection_status |

| replication_group_member_stats |

| replication_group_members |

| rwlock_instances |

| session_account_connect_attrs |

| session_connect_attrs |

| session_status |

| session_variables |

| setup_actors |

| setup_consumers |

| setup_instruments |

| setup_objects |

| setup_timers |

| socket_instances |

| socket_summary_by_event_name |

| socket_summary_by_instance |

| status_by_account |

| status_by_host |

| status_by_thread |

| status_by_user |

| table_handles |

| table_io_waits_summary_by_index_usage |

| table_io_waits_summary_by_table |

| table_lock_waits_summary_by_table |

| threads |

| user_variables_by_thread |

| users |

| variables_by_thread |

+------------------------------------------------------+

87 rows in set (0.00 sec)

2.3、performance_schema表的分类

按照事件类型分组记录性能事件数据的表

语句事件记录表,这些表记录了语句事件信息:

events_statements_current当前语句事件表

events_statements_history历史语句事件表

events_statements_history_long长语句历史事件表

summary聚合后的摘要表

account帐号

host主机

program程序

thread线程

user用户

global全局

memory内存

file文件系统

root@[performance_schema]> show tables like 'events_statement%';

+----------------------------------------------------+

| Tables_in_performance_schema (events_statement%) |

+----------------------------------------------------+

| events_statements_current |

| events_statements_history |

| events_statements_history_long |

| events_statements_summary_by_account_by_event_name |

| events_statements_summary_by_digest |

| events_statements_summary_by_host_by_event_name |

| events_statements_summary_by_program |

| events_statements_summary_by_thread_by_event_name |

| events_statements_summary_by_user_by_event_name |

| events_statements_summary_global_by_event_name |

+----------------------------------------------------+

10 rows in set (0.00 sec)

root@[performance_schema]> show tables like 'events_wait%';

+-----------------------------------------------+

| Tables_in_performance_schema (events_wait%) |

+-----------------------------------------------+

| events_waits_current |

| events_waits_history |

| events_waits_history_long |

| events_waits_summary_by_account_by_event_name |

| events_waits_summary_by_host_by_event_name |

| events_waits_summary_by_instance |

| events_waits_summary_by_thread_by_event_name |

| events_waits_summary_by_user_by_event_name |

| events_waits_summary_global_by_event_name |

+-----------------------------------------------+

9 rows in set (0.00 sec)

2.4、performance_schema简单配置与使用

打开等待事件的采集器配置项开关,需要修改setup_instruments 配置表中对应的采集器配置项。

root@[performance_schema]> update setup_instruments set enabled = 'YES', timed = 'YES'where name like 'wait%';

Query OK, 265 rows affected (0.03 sec)

Rows matched: 319 Changed: 265 Warnings: 0

打开等待事件的保存表配置开关,修改修改setup_consumers 配置表中对应的配置项。

update setup_consumers set enabled = 'YES' where name like '%wait%';

root@[performance_schema]> update setup_consumers set enabled = 'YES' where name like '%wait%';

Query OK, 3 rows affected (0.00 sec)

Rows matched: 3 Changed: 3 Warnings: 0

配置好之后,我们就可以查看server当前正在做什么,可以通过查询events_waits_current表来得知,该表中每个线程只包含一行数据,用于显示每个线程的最新监视事件(正在做的事情):

select * from events_waits_current\G

root@[performance_schema]> select * from events_waits_current\G

*************************** 1. row ***************************

THREAD_ID: 1

EVENT_ID: 144

END_EVENT_ID: 144

EVENT_NAME: wait/synch/mutex/sql/LOCK_thread_cache

SOURCE: connection_handler_per_thread.cc:370

TIMER_START: 9865686496806223209

TIMER_END: 9865686496806280449

TIMER_WAIT: 57240

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 31970336

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: lock

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 2. row ***************************

THREAD_ID: 13

EVENT_ID: 6723

END_EVENT_ID: 6723

EVENT_NAME: wait/synch/mutex/innodb/buf_dblwr_mutex

SOURCE: buf0dblwr.cc:954

TIMER_START: 9865691303536408077

TIMER_END: 9865691303536442421

TIMER_WAIT: 34344

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 210662264

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: lock

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 3. row ***************************

THREAD_ID: 15

EVENT_ID: 168

END_EVENT_ID: 168

EVENT_NAME: wait/synch/mutex/innodb/lock_wait_mutex

SOURCE: lock0wait.cc:508

TIMER_START: 9865691970349175964

TIMER_END: 9865691970349277565

TIMER_WAIT: 101601

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 140228193497336

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: lock

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 4. row ***************************

THREAD_ID: 16

EVENT_ID: 507

END_EVENT_ID: 507

EVENT_NAME: wait/synch/mutex/innodb/sync_array_mutex

SOURCE: sync0arr.cc:1162

TIMER_START: 9865691865480898161

TIMER_END: 9865691865481034106

TIMER_WAIT: 135945

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 36898896

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: lock

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 5. row ***************************

THREAD_ID: 18

EVENT_ID: 2664

END_EVENT_ID: 2664

EVENT_NAME: wait/synch/mutex/innodb/flush_list_mutex

SOURCE: buf0buf.cc:418

TIMER_START: 9865691341648206750

TIMER_END: 9865691341648243956

TIMER_WAIT: 37206

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 40103504

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: lock

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 6. row ***************************

THREAD_ID: 24

EVENT_ID: 16

END_EVENT_ID: 16

EVENT_NAME: wait/synch/mutex/innodb/recalc_pool_mutex

SOURCE: dict0stats_bg.cc:165

TIMER_START: 9865682559078110424

TIMER_END: 9865682559078668514

TIMER_WAIT: 558090

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 32525376

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: lock

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 7. row ***************************

THREAD_ID: 2342731

EVENT_ID: 44

END_EVENT_ID: 44

EVENT_NAME: wait/synch/mutex/mysys/IO_CACHE::append_buffer_lock

SOURCE: mf_iocache.c:1531

TIMER_START: 9865680439566973626

TIMER_END: 9865680439567029435

TIMER_WAIT: 55809

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 212862648

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: lock

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 8. row ***************************

THREAD_ID: 2342732

EVENT_ID: 2240

END_EVENT_ID: NULL

EVENT_NAME: wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond

SOURCE: binlog.cc:7864

TIMER_START: 9865691864122605840

TIMER_END: 9865691988047400456

TIMER_WAIT: 123924794616

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 212863152

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: timed_wait

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 9. row ***************************

THREAD_ID: 2390264

EVENT_ID: 25159

END_EVENT_ID: NULL

EVENT_NAME: idle

SOURCE: socket_connection.cc:69

TIMER_START: 9853460924013000000

TIMER_END: 9853494292491000000

TIMER_WAIT: 33368478000000

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 0

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: idle

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 10. row ***************************

THREAD_ID: 2390268

EVENT_ID: 9170

END_EVENT_ID: NULL

EVENT_NAME: idle

SOURCE: socket_connection.cc:69

TIMER_START: 9853441910470000000

TIMER_END: 9853494292494000000

TIMER_WAIT: 52382024000000

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 0

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: idle

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 11. row ***************************

THREAD_ID: 2390984

EVENT_ID: 15701

END_EVENT_ID: NULL

EVENT_NAME: idle

SOURCE: socket_connection.cc:69

TIMER_START: 9853381882023000000

TIMER_END: 9853494292496000000

TIMER_WAIT: 112410473000000

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 0

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: idle

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 12. row ***************************

THREAD_ID: 2642025

EVENT_ID: 373

END_EVENT_ID: 373

EVENT_NAME: wait/synch/mutex/sql/THD::LOCK_query_plan

SOURCE: sql_class.h:1696

TIMER_START: 9865691987998918176

TIMER_END: 9865691987998979709

TIMER_WAIT: 61533

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 140226051725280

NESTING_EVENT_ID: 363

NESTING_EVENT_TYPE: STATEMENT

OPERATION: lock

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 13. row ***************************

THREAD_ID: 2627784

EVENT_ID: 9528

END_EVENT_ID: NULL

EVENT_NAME: idle

SOURCE: socket_connection.cc:69

TIMER_START: 9853374702212000000

TIMER_END: 9853494292502000000

TIMER_WAIT: 119590290000000

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 0

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: idle

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 14. row ***************************

THREAD_ID: 2572438

EVENT_ID: 19474

END_EVENT_ID: NULL

EVENT_NAME: idle

SOURCE: socket_connection.cc:69

TIMER_START: 9853381872622000000

TIMER_END: 9853494292504000000

TIMER_WAIT: 112419882000000

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 0

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: idle

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 15. row ***************************

THREAD_ID: 2641654

EVENT_ID: 1864

END_EVENT_ID: NULL

EVENT_NAME: idle

SOURCE: socket_connection.cc:69

TIMER_START: 9853440844046000000

TIMER_END: 9853494292506000000

TIMER_WAIT: 53448460000000

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 0

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: idle

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 16. row ***************************

THREAD_ID: 2515837

EVENT_ID: 8532

END_EVENT_ID: NULL

EVENT_NAME: idle

SOURCE: socket_connection.cc:69

TIMER_START: 9853441905775000000

TIMER_END: 9853494292509000000

TIMER_WAIT: 52386734000000

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 0

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: idle

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 17. row ***************************

THREAD_ID: 2390507

EVENT_ID: 9037

END_EVENT_ID: NULL

EVENT_NAME: idle

SOURCE: socket_connection.cc:69

TIMER_START: 9853441908947000000

TIMER_END: 9853494292511000000

TIMER_WAIT: 52383564000000

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 0

NESTING_EVENT_ID: NULL

NESTING_EVENT_TYPE: NULL

OPERATION: idle

NUMBER_OF_BYTES: NULL

FLAGS: NULL

*************************** 18. row ***************************

THREAD_ID: 2633808

EVENT_ID: 35

END_EVENT_ID: NULL

EVENT_NAME: wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond

SOURCE: binlog.cc:7897

TIMER_START: 9865689922501825131

TIMER_END: 9865691988075541071

TIMER_WAIT: 2065573715940

SPINS: NULL

OBJECT_SCHEMA: NULL

OBJECT_NAME: NULL

INDEX_NAME: NULL

OBJECT_TYPE: NULL

OBJECT_INSTANCE_BEGIN: 31973472

NESTING_EVENT_ID: 11

NESTING_EVENT_TYPE: STATEMENT

OPERATION: timed_wait

NUMBER_OF_BYTES: NULL

FLAGS: NULL

18 rows in set (0.00 sec)

#第12行事件信息表示线程ID为2642025的线程正在等待innodb存储引擎的LOCK_query_plan锁,这是innodb存储引擎的一个互斥锁,等待时间为61533皮秒如果该事件正在运行而没有结束,那么TIMER_END和TIMER_WAIT的值显示为NULL。

_current表中每个线程只保留一条记录,且一旦线程完成工作,该表中不会再记录该线程的事件信息,_history表中记录每个线程已经执行完成的事件信息,但每个线程的只事件信息只记录10条,再多就会被覆盖掉,*_history_long表中记录所有线程的事件信息,但总记录数量是10000行,超过会被覆盖掉,现在咱们查看一下历史表events_waits_history 中记录了什么:

root@[performance_schema]> select thread_id,event_id,event_name,timer_wait from events_waits_history order by thread_id;

+-----------+----------+-----------------------------------------------------+----------------+

| thread_id | event_id | event_name | timer_wait |

+-----------+----------+-----------------------------------------------------+----------------+

| 1 | 1541 | wait/synch/mutex/sql/LOCK_connection_count | 198909 |

| 1 | 1542 | wait/synch/mutex/sql/LOCK_thread_cache | 54378 |

| 1 | 1543 | wait/io/socket/sql/server_tcpip_socket | 3113856 |

| 1 | 1544 | wait/synch/mutex/sql/LOCK_connection_count | 184599 |

| 1 | 1545 | wait/synch/mutex/sql/LOCK_thread_cache | 50085 |

| 1 | 1546 | wait/io/socket/sql/server_tcpip_socket | 2233791 |

| 1 | 1547 | wait/synch/mutex/sql/LOCK_connection_count | 196047 |

| 1 | 1548 | wait/synch/mutex/sql/LOCK_thread_cache | 54378 |

| 1 | 1539 | wait/synch/mutex/sql/LOCK_thread_cache | 143100 |

| 1 | 1540 | wait/io/socket/sql/server_tcpip_socket | 3125304 |

| 4 | 1 | wait/synch/mutex/innodb/fil_system_mutex | 294786 |

| 4 | 2 | wait/synch/mutex/innodb/fil_system_mutex | 68688 |

| 4 | 3 | wait/io/file/innodb/innodb_log_file | 1378994598 |

| 4 | 4 | wait/synch/mutex/innodb/fil_system_mutex | 65826 |

| 4 | 5 | wait/synch/mutex/innodb/log_sys_mutex | 31482 |

| 9 | 131 | wait/synch/mutex/innodb/buf_pool_mutex | 62964 |

| 9 | 132 | wait/synch/mutex/innodb/flush_list_mutex | 77274 |

| 9 | 133 | wait/synch/mutex/innodb/fil_system_mutex | 74412 |

| 9 | 134 | wait/synch/mutex/innodb/buf_pool_mutex | 118773 |

| 9 | 135 | wait/synch/mutex/innodb/flush_list_mutex | 72981 |

| 9 | 136 | wait/synch/mutex/innodb/fil_system_mutex | 103032 |

| 9 | 137 | wait/synch/mutex/innodb/buf_pool_mutex | 32913 |

| 9 | 138 | wait/synch/mutex/innodb/flush_list_mutex | 74412 |

| 9 | 129 | wait/synch/mutex/innodb/flush_list_mutex | 61533 |

| 9 | 130 | wait/synch/mutex/innodb/fil_system_mutex | 334854 |

| 10 | 81 | wait/synch/mutex/innodb/flush_list_mutex | 30051 |

| 10 | 82 | wait/synch/mutex/innodb/fil_system_mutex | 35775 |

| 10 | 83 | wait/synch/mutex/innodb/buf_pool_mutex | 38637 |

| 10 | 84 | wait/synch/mutex/innodb/flush_list_mutex | 38637 |

| 10 | 85 | wait/synch/mutex/innodb/fil_system_mutex | 38637 |

| 10 | 86 | wait/synch/mutex/innodb/buf_pool_mutex | 37206 |

| 10 | 87 | wait/synch/mutex/innodb/flush_list_mutex | 38637 |

| 10 | 88 | wait/synch/mutex/innodb/fil_system_mutex | 30051 |

| 10 | 89 | wait/synch/mutex/innodb/buf_pool_mutex | 31482 |

| 10 | 90 | wait/synch/mutex/innodb/flush_list_mutex | 35775 |

| 13 | 76751 | wait/synch/mutex/innodb/buf_dblwr_mutex | 35775 |

| 13 | 76742 | wait/synch/mutex/innodb/buf_pool_mutex | 118773 |

| 13 | 76743 | wait/synch/mutex/innodb/buf_pool_mutex | 32913 |

| 13 | 76744 | wait/synch/mutex/innodb/flush_list_mutex | 135945 |

| 13 | 76745 | wait/synch/mutex/innodb/buf_pool_mutex | 32913 |

| 13 | 76746 | wait/synch/mutex/innodb/buf_dblwr_mutex | 31482 |

| 13 | 76747 | wait/synch/mutex/innodb/buf_pool_mutex | 108756 |

| 13 | 76748 | wait/synch/mutex/innodb/buf_pool_mutex | 31482 |

| 13 | 76749 | wait/synch/mutex/innodb/flush_list_mutex | 210357 |

| 13 | 76750 | wait/synch/mutex/innodb/buf_pool_mutex | 31482 |

| 15 | 1891 | wait/synch/mutex/innodb/lock_wait_mutex | 237546 |

| 15 | 1892 | wait/synch/mutex/innodb/lock_wait_mutex | 263304 |

| 15 | 1893 | wait/synch/mutex/innodb/lock_wait_mutex | 313389 |

| 15 | 1894 | wait/synch/mutex/innodb/lock_wait_mutex | 253287 |

| 15 | 1885 | wait/synch/mutex/innodb/lock_wait_mutex | 233253 |

| 15 | 1886 | wait/synch/mutex/innodb/lock_wait_mutex | 287631 |

| 15 | 1887 | wait/synch/mutex/innodb/lock_wait_mutex | 251856 |

| 15 | 1888 | wait/synch/mutex/innodb/lock_wait_mutex | 228960 |

| 15 | 1889 | wait/synch/mutex/innodb/lock_wait_mutex | 230391 |

| 15 | 1890 | wait/synch/mutex/innodb/lock_wait_mutex | 256149 |

| 16 | 5711 | wait/synch/mutex/innodb/log_sys_mutex | 402111 |

| 16 | 5712 | wait/synch/mutex/innodb/sync_array_mutex | 52947 |

| 16 | 5713 | wait/synch/mutex/innodb/sync_array_mutex | 50085 |

| 16 | 5704 | wait/synch/mutex/innodb/sync_array_mutex | 47223 |

| 16 | 5705 | wait/synch/mutex/innodb/log_sys_mutex | 698328 |

| 16 | 5706 | wait/synch/mutex/innodb/sync_array_mutex | 60102 |

| 16 | 5707 | wait/synch/mutex/innodb/sync_array_mutex | 40068 |

| 16 | 5708 | wait/synch/mutex/innodb/log_sys_mutex | 392094 |

| 16 | 5709 | wait/synch/mutex/innodb/sync_array_mutex | 58671 |

| 16 | 5710 | wait/synch/mutex/innodb/sync_array_mutex | 47223 |

| 18 | 30111 | wait/synch/mutex/innodb/flush_list_mutex | 34344 |

| 18 | 30112 | wait/synch/mutex/innodb/flush_list_mutex | 41499 |

| 18 | 30103 | wait/synch/mutex/innodb/log_sys_mutex | 32913 |

| 18 | 30104 | wait/synch/mutex/innodb/log_flush_order_mutex | 31482 |

| 18 | 30105 | wait/synch/mutex/innodb/flush_list_mutex | 87291 |

| 18 | 30106 | wait/synch/mutex/innodb/flush_list_mutex | 57240 |

| 18 | 30107 | wait/synch/mutex/innodb/flush_list_mutex | 47223 |

| 18 | 30108 | wait/synch/mutex/innodb/flush_list_mutex | 34344 |

| 18 | 30109 | wait/synch/mutex/innodb/flush_list_mutex | 40068 |

| 18 | 30110 | wait/synch/mutex/innodb/flush_list_mutex | 41499 |

| 24 | 181 | wait/synch/mutex/innodb/recalc_pool_mutex | 352026 |

| 24 | 182 | wait/synch/mutex/innodb/recalc_pool_mutex | 598158 |

| 24 | 183 | wait/synch/mutex/innodb/recalc_pool_mutex | 540918 |

| 24 | 184 | wait/synch/mutex/innodb/recalc_pool_mutex | 466506 |

| 24 | 185 | wait/synch/mutex/innodb/recalc_pool_mutex | 515160 |

| 24 | 186 | wait/synch/mutex/innodb/recalc_pool_mutex | 560952 |

| 24 | 187 | wait/synch/mutex/innodb/recalc_pool_mutex | 576693 |

| 24 | 188 | wait/synch/mutex/innodb/recalc_pool_mutex | 556659 |

| 24 | 189 | wait/synch/mutex/innodb/recalc_pool_mutex | 528039 |

| 24 | 180 | wait/synch/mutex/innodb/recalc_pool_mutex | 767016 |

| 2342731 | 501 | wait/synch/mutex/sql/Master_info::data_lock | 313389 |

| 2342731 | 502 | wait/synch/mutex/sql/Master_info::data_lock | 55809 |

| 2342731 | 503 | wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_log | 141669 |

| 2342731 | 504 | wait/synch/mutex/mysys/IO_CACHE::append_buffer_lock | 62964 |

| 2342731 | 495 | wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_log | 150255 |

| 2342731 | 496 | wait/synch/mutex/mysys/IO_CACHE::append_buffer_lock | 178875 |

| 2342731 | 497 | wait/synch/mutex/sql/Master_info::data_lock | 330561 |

| 2342731 | 498 | wait/synch/mutex/sql/Master_info::data_lock | 44361 |

| 2342731 | 499 | wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_log | 115911 |

| 2342731 | 500 | wait/synch/mutex/mysys/IO_CACHE::append_buffer_lock | 65826 |

| 2342732 | 25251 | wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_log | 38637 |

| 2342732 | 25252 | wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond | 300444355737 |

| 2342732 | 25253 | wait/synch/mutex/sql/THD::LOCK_current_cond | 193185 |

| 2342732 | 25254 | wait/synch/mutex/sql/key_mts_gaq_LOCK | 32913 |

| 2342732 | 25255 | wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_log | 38637 |

| 2342732 | 25246 | wait/synch/mutex/sql/key_mts_gaq_LOCK | 58671 |

| 2342732 | 25247 | wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_log | 42930 |

| 2342732 | 25248 | wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond | 300441407877 |

| 2342732 | 25249 | wait/synch/mutex/sql/THD::LOCK_current_cond | 206064 |

| 2342732 | 25250 | wait/synch/mutex/sql/key_mts_gaq_LOCK | 31482 |

| 2390264 | 32776 | wait/synch/mutex/sql/THD::LOCK_thd_data | 51516 |

| 2390264 | 32777 | wait/synch/mutex/sql/LOCK_table_cache | 61533 |

| 2390264 | 32778 | wait/io/socket/sql/client_connection | 33159132 |

| 2390264 | 32779 | wait/synch/mutex/sql/THD::LOCK_thd_query | 124497 |

| 2390264 | 32770 | wait/synch/mutex/innodb/trx_mutex | 31482 |

| 2390264 | 32771 | wait/synch/mutex/innodb/trx_mutex | 42930 |

| 2390264 | 32772 | wait/synch/mutex/innodb/trx_mutex | 30051 |

| 2390264 | 32773 | wait/synch/mutex/sql/THD::LOCK_query_plan | 101601 |

| 2390264 | 32774 | wait/synch/mutex/innodb/trx_mutex | 45792 |

| 2390264 | 32775 | wait/synch/mutex/innodb/trx_mutex | 31482 |

| 2390268 | 9278 | wait/synch/mutex/sql/THD::LOCK_query_plan | 105894 |

| 2390268 | 9279 | wait/synch/mutex/innodb/trx_mutex | 31482 |

| 2390268 | 9280 | wait/synch/mutex/innodb/trx_mutex | 30051 |

| 2390268 | 9281 | wait/synch/mutex/sql/THD::LOCK_thd_data | 47223 |

| 2390268 | 9282 | wait/synch/mutex/sql/LOCK_table_cache | 61533 |

| 2390268 | 9283 | wait/io/socket/sql/client_connection | 20387457 |

| 2390268 | 9284 | wait/synch/mutex/sql/THD::LOCK_thd_query | 93015 |

| 2390268 | 9275 | wait/synch/mutex/innodb/trx_mutex | 30051 |

| 2390268 | 9276 | wait/synch/mutex/innodb/trx_mutex | 31482 |

| 2390268 | 9277 | wait/synch/mutex/innodb/trx_mutex | 31482 |

| 2390507 | 9511 | wait/synch/mutex/sql/THD::LOCK_thd_query | 58671 |

| 2390507 | 9502 | wait/synch/mutex/innodb/trx_mutex | 31482 |

| 2390507 | 9503 | wait/synch/mutex/innodb/trx_mutex | 44361 |

| 2390507 | 9504 | wait/synch/mutex/innodb/trx_mutex | 31482 |

| 2390507 | 9505 | wait/synch/mutex/sql/THD::LOCK_query_plan | 174582 |

| 2390507 | 9506 | wait/synch/mutex/innodb/trx_mutex | 40068 |

| 2390507 | 9507 | wait/synch/mutex/innodb/trx_mutex | 37206 |

| 2390507 | 9508 | wait/synch/mutex/sql/THD::LOCK_thd_data | 47223 |

| 2390507 | 9509 | wait/synch/mutex/sql/LOCK_table_cache | 100170 |

| 2390507 | 9510 | wait/io/socket/sql/client_connection | 21065751 |

| 2390984 | 16526 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 110187 |

| 2390984 | 16527 | wait/synch/mutex/sql/THD::LOCK_query_plan | 60102 |

| 2390984 | 16528 | wait/synch/rwlock/sql/LOCK_grant | 47223 |

| 2390984 | 16529 | wait/synch/mutex/sql/THD::LOCK_thd_sysvar | 97308 |

| 2390984 | 16530 | wait/synch/mutex/sql/THD::LOCK_query_plan | 47223 |

| 2390984 | 16531 | wait/io/socket/sql/client_connection | 13540122 |

| 2390984 | 16532 | wait/synch/mutex/sql/THD::LOCK_thd_query | 55809 |

| 2390984 | 16523 | wait/synch/mutex/sql/THD::LOCK_thd_data | 110187 |

| 2390984 | 16524 | wait/synch/mutex/sql/THD::LOCK_thd_query | 51516 |

| 2390984 | 16525 | wait/synch/mutex/sql/LOCK_plugin | 74412 |

| 2515836 | 5217 | wait/synch/mutex/sql/THD::LOCK_thd_query | 211788 |

| 2515836 | 5208 | wait/synch/mutex/innodb/trx_mutex | 31482 |

| 2515836 | 5209 | wait/synch/mutex/innodb/trx_mutex | 34344 |

| 2515836 | 5210 | wait/synch/mutex/innodb/trx_mutex | 30051 |

| 2515836 | 5211 | wait/synch/mutex/sql/THD::LOCK_query_plan | 85860 |

| 2515836 | 5212 | wait/synch/mutex/innodb/trx_mutex | 50085 |

| 2515836 | 5213 | wait/synch/mutex/innodb/trx_mutex | 31482 |

| 2515836 | 5214 | wait/synch/mutex/sql/THD::LOCK_thd_data | 65826 |

| 2515836 | 5215 | wait/synch/mutex/sql/LOCK_table_cache | 72981 |

| 2515836 | 5216 | wait/io/socket/sql/client_connection | 14247036 |

| 2515837 | 9429 | wait/io/socket/sql/client_connection | 8451486 |

| 2515837 | 9430 | wait/synch/mutex/sql/THD::LOCK_thd_query | 57240 |

| 2515837 | 9421 | wait/synch/mutex/sql/THD::LOCK_thd_data | 131652 |

| 2515837 | 9422 | wait/synch/mutex/sql/THD::LOCK_thd_query | 30051 |

| 2515837 | 9423 | wait/synch/mutex/sql/LOCK_plugin | 55809 |

| 2515837 | 9424 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 186030 |

| 2515837 | 9425 | wait/synch/mutex/sql/THD::LOCK_query_plan | 35775 |

| 2515837 | 9426 | wait/synch/rwlock/sql/LOCK_grant | 42930 |

| 2515837 | 9427 | wait/synch/mutex/sql/THD::LOCK_thd_sysvar | 51516 |

| 2515837 | 9428 | wait/synch/mutex/sql/THD::LOCK_query_plan | 37206 |

| 2572438 | 21193 | wait/io/socket/sql/client_connection | 7932033 |

| 2572438 | 21194 | wait/synch/mutex/sql/THD::LOCK_thd_query | 42930 |

| 2572438 | 21185 | wait/synch/mutex/sql/THD::LOCK_thd_data | 121635 |

| 2572438 | 21186 | wait/synch/mutex/sql/THD::LOCK_thd_query | 35775 |

| 2572438 | 21187 | wait/synch/mutex/sql/LOCK_plugin | 44361 |

| 2572438 | 21188 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 103032 |

| 2572438 | 21189 | wait/synch/mutex/sql/THD::LOCK_query_plan | 61533 |

| 2572438 | 21190 | wait/synch/rwlock/sql/LOCK_grant | 52947 |

| 2572438 | 21191 | wait/synch/mutex/sql/THD::LOCK_thd_sysvar | 47223 |

| 2572438 | 21192 | wait/synch/mutex/sql/THD::LOCK_query_plan | 35775 |

| 2596129 | 12518 | wait/synch/mutex/sql/THD::LOCK_thd_query | 131652 |

| 2596129 | 12509 | wait/synch/mutex/sql/THD::LOCK_thd_data | 103032 |

| 2596129 | 12510 | wait/synch/mutex/sql/THD::LOCK_thd_query | 31482 |

| 2596129 | 12511 | wait/synch/mutex/sql/LOCK_plugin | 60102 |

| 2596129 | 12512 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 153117 |

| 2596129 | 12513 | wait/synch/mutex/sql/THD::LOCK_query_plan | 42930 |

| 2596129 | 12514 | wait/synch/rwlock/sql/LOCK_grant | 55809 |

| 2596129 | 12515 | wait/synch/mutex/sql/THD::LOCK_thd_sysvar | 47223 |

| 2596129 | 12516 | wait/synch/mutex/sql/THD::LOCK_query_plan | 32913 |

| 2596129 | 12517 | wait/io/socket/sql/client_connection | 11087388 |

| 2622212 | 51042 | wait/synch/mutex/sql/THD::LOCK_thd_sysvar | 61533 |

| 2622212 | 51043 | wait/synch/mutex/sql/THD::LOCK_query_plan | 55809 |

| 2622212 | 51044 | wait/io/socket/sql/client_connection | 8661843 |

| 2622212 | 51045 | wait/synch/mutex/sql/THD::LOCK_thd_query | 93015 |

| 2622212 | 51036 | wait/synch/mutex/sql/THD::LOCK_thd_data | 113049 |

| 2622212 | 51037 | wait/synch/mutex/sql/THD::LOCK_thd_query | 34344 |

| 2622212 | 51038 | wait/synch/mutex/sql/LOCK_plugin | 57240 |

| 2622212 | 51039 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 281907 |

| 2622212 | 51040 | wait/synch/mutex/sql/THD::LOCK_query_plan | 54378 |

| 2622212 | 51041 | wait/synch/rwlock/sql/LOCK_grant | 51516 |

| 2627784 | 10397 | wait/synch/mutex/sql/THD::LOCK_thd_query | 55809 |

| 2627784 | 10388 | wait/synch/mutex/sql/THD::LOCK_thd_data | 113049 |

| 2627784 | 10389 | wait/synch/mutex/sql/THD::LOCK_thd_query | 35775 |

| 2627784 | 10390 | wait/synch/mutex/sql/LOCK_plugin | 70119 |

| 2627784 | 10391 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 87291 |

| 2627784 | 10392 | wait/synch/mutex/sql/THD::LOCK_query_plan | 48654 |

| 2627784 | 10393 | wait/synch/rwlock/sql/LOCK_grant | 52947 |

| 2627784 | 10394 | wait/synch/mutex/sql/THD::LOCK_thd_sysvar | 51516 |

| 2627784 | 10395 | wait/synch/mutex/sql/THD::LOCK_query_plan | 48654 |

| 2627784 | 10396 | wait/io/socket/sql/client_connection | 7940619 |

| 2633808 | 262 | wait/io/socket/sql/client_connection | 23180769 |

| 2633808 | 263 | wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond | 15018642171477 |

| 2633808 | 264 | wait/io/socket/sql/client_connection | 40541661 |

| 2633808 | 255 | wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond | 15018632104392 |

| 2633808 | 256 | wait/io/socket/sql/client_connection | 25239978 |

| 2633808 | 257 | wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond | 15018629796189 |

| 2633808 | 258 | wait/io/socket/sql/client_connection | 25229961 |

| 2633808 | 259 | wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond | 15018630958161 |

| 2633808 | 260 | wait/io/socket/sql/client_connection | 20210013 |

| 2633808 | 261 | wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond | 15018631865415 |

| 2641525 | 11376 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 140238 |

| 2641525 | 11377 | wait/synch/mutex/sql/THD::LOCK_query_plan | 67257 |

| 2641525 | 11378 | wait/synch/rwlock/sql/LOCK_grant | 105894 |

| 2641525 | 11379 | wait/synch/mutex/sql/THD::LOCK_thd_sysvar | 42930 |

| 2641525 | 11380 | wait/synch/mutex/sql/THD::LOCK_query_plan | 31482 |

| 2641525 | 11381 | wait/io/socket/sql/client_connection | 7933464 |

| 2641525 | 11382 | wait/synch/mutex/sql/THD::LOCK_thd_query | 75843 |

| 2641525 | 11373 | wait/synch/mutex/sql/THD::LOCK_thd_data | 154548 |

| 2641525 | 11374 | wait/synch/mutex/sql/THD::LOCK_thd_query | 34344 |

| 2641525 | 11375 | wait/synch/mutex/sql/LOCK_plugin | 60102 |

| 2641527 | 2279 | wait/synch/rwlock/sql/LOCK_grant | 52947 |

| 2641527 | 2280 | wait/synch/mutex/sql/THD::LOCK_thd_sysvar | 51516 |

| 2641527 | 2281 | wait/synch/mutex/sql/THD::LOCK_query_plan | 51516 |

| 2641527 | 2282 | wait/io/socket/sql/client_connection | 8321265 |

| 2641527 | 2283 | wait/synch/mutex/sql/THD::LOCK_thd_query | 65826 |

| 2641527 | 2274 | wait/synch/mutex/sql/THD::LOCK_thd_data | 128790 |

| 2641527 | 2275 | wait/synch/mutex/sql/THD::LOCK_thd_query | 47223 |

| 2641527 | 2276 | wait/synch/mutex/sql/LOCK_plugin | 78705 |

| 2641527 | 2277 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 445041 |

| 2641527 | 2278 | wait/synch/mutex/sql/THD::LOCK_query_plan | 51516 |

| 2641653 | 3592 | wait/synch/mutex/sql/THD::LOCK_thd_query | 88722 |

| 2641653 | 3583 | wait/synch/mutex/sql/THD::LOCK_thd_data | 153117 |

| 2641653 | 3584 | wait/synch/mutex/sql/THD::LOCK_thd_query | 44361 |

| 2641653 | 3585 | wait/synch/mutex/sql/LOCK_plugin | 68688 |

| 2641653 | 3586 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 160272 |

| 2641653 | 3587 | wait/synch/mutex/sql/THD::LOCK_query_plan | 45792 |

| 2641653 | 3588 | wait/synch/rwlock/sql/LOCK_grant | 58671 |

| 2641653 | 3589 | wait/synch/mutex/sql/THD::LOCK_thd_sysvar | 38637 |

| 2641653 | 3590 | wait/synch/mutex/sql/THD::LOCK_query_plan | 50085 |

| 2641653 | 3591 | wait/io/socket/sql/client_connection | 11134611 |

| 2641654 | 27862 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 173151 |

| 2641654 | 27863 | wait/synch/mutex/sql/THD::LOCK_query_plan | 40068 |

| 2641654 | 27864 | wait/synch/rwlock/sql/LOCK_grant | 55809 |

| 2641654 | 27865 | wait/synch/mutex/sql/THD::LOCK_thd_sysvar | 87291 |

| 2641654 | 27866 | wait/synch/mutex/sql/THD::LOCK_query_plan | 75843 |

| 2641654 | 27867 | wait/io/socket/sql/client_connection | 11873007 |

| 2641654 | 27868 | wait/synch/mutex/sql/THD::LOCK_thd_query | 61533 |

| 2641654 | 27859 | wait/synch/mutex/sql/THD::LOCK_thd_data | 78705 |

| 2641654 | 27860 | wait/synch/mutex/sql/THD::LOCK_thd_query | 35775 |

| 2641654 | 27861 | wait/synch/mutex/sql/LOCK_plugin | 60102 |

| 2641688 | 10185 | wait/synch/mutex/sql/THD::LOCK_query_plan | 40068 |

| 2641688 | 10186 | wait/io/socket/sql/client_connection | 7651557 |

| 2641688 | 10187 | wait/synch/mutex/sql/THD::LOCK_thd_query | 74412 |

| 2641688 | 10178 | wait/synch/mutex/sql/THD::LOCK_thd_data | 211788 |

| 2641688 | 10179 | wait/synch/mutex/sql/THD::LOCK_thd_query | 31482 |

| 2641688 | 10180 | wait/synch/mutex/sql/LOCK_plugin | 41499 |

| 2641688 | 10181 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 168858 |

| 2641688 | 10182 | wait/synch/mutex/sql/THD::LOCK_query_plan | 70119 |

| 2641688 | 10183 | wait/synch/rwlock/sql/LOCK_grant | 47223 |

| 2641688 | 10184 | wait/synch/mutex/sql/THD::LOCK_thd_sysvar | 45792 |

| 2642025 | 383 | wait/synch/mutex/sql/THD::LOCK_thd_data | 130221 |

| 2642025 | 384 | wait/synch/mutex/sql/THD::LOCK_thd_query | 58671 |

| 2642025 | 385 | wait/synch/mutex/sql/THD::LOCK_query_plan | 93015 |

| 2642025 | 386 | wait/synch/rwlock/sql/LOCK_grant | 253287 |

| 2642025 | 387 | wait/synch/mutex/sql/LOCK_table_cache | 145962 |

| 2642025 | 388 | wait/synch/mutex/sql/THD::LOCK_thd_data | 134514 |

| 2642025 | 389 | wait/synch/mutex/mysys/THR_LOCK::mutex | 137376 |

| 2642025 | 390 | wait/synch/mutex/sql/THD::LOCK_query_plan | 47223 |

| 2642025 | 391 | wait/synch/mutex/sql/THD::LOCK_query_plan | 68688 |

| 2642025 | 382 | wait/io/socket/sql/client_connection | 2218050 |

| 2642174 | 29946 | wait/synch/mutex/sql/THD::LOCK_thd_data | 383508 |

| 2642174 | 29947 | wait/synch/mutex/sql/LOCK_table_cache | 154548 |

| 2642174 | 29948 | wait/synch/mutex/sql/THD::LOCK_query_plan | 118773 |

| 2642174 | 29949 | wait/io/socket/sql/client_connection | 19666233 |

| 2642174 | 29950 | wait/synch/mutex/sql/THD::LOCK_thd_query | 13431366 |

| 2642174 | 29941 | wait/synch/mutex/innodb/autoinc_mutex | 41499 |

| 2642174 | 29942 | wait/synch/mutex/innodb/trx_mutex | 198909 |

| 2642174 | 29943 | wait/synch/mutex/innodb/trx_mutex | 38637 |

| 2642174 | 29944 | wait/synch/mutex/innodb/srv_dict_tmpfile_mutex | 34344 |

| 2642174 | 29945 | wait/synch/mutex/innodb/dict_sys_mutex | 62964 |

| 2642179 | 1266 | wait/synch/mutex/innodb/trx_mutex | 31482 |

| 2642179 | 1267 | wait/synch/mutex/mysys/BITMAP::mutex | 70119 |

| 2642179 | 1268 | wait/io/socket/sql/client_connection | 17267877 |

| 2642179 | 1269 | wait/synch/mutex/sql/THD::LOCK_thd_query | 64395 |

| 2642179 | 1260 | wait/synch/sxlock/innodb/hash_table_locks | 48654 |

| 2642179 | 1261 | wait/synch/mutex/innodb/log_sys_mutex | 41499 |

| 2642179 | 1262 | wait/synch/mutex/innodb/rw_lock_list_mutex | 51516 |

| 2642179 | 1263 | wait/synch/mutex/innodb/rw_lock_list_mutex | 41499 |

| 2642179 | 1264 | wait/synch/mutex/innodb/trx_sys_mutex | 38637 |

| 2642179 | 1265 | wait/synch/mutex/innodb/trx_pool_mutex | 35775 |

| 2642184 | 641 | wait/synch/mutex/innodb/rw_lock_list_mutex | 30051 |

| 2642184 | 642 | wait/synch/mutex/innodb/trx_sys_mutex | 31482 |

| 2642184 | 643 | wait/synch/mutex/innodb/trx_pool_mutex | 42930 |

| 2642184 | 644 | wait/synch/mutex/innodb/trx_mutex | 31482 |

| 2642184 | 645 | wait/synch/mutex/mysys/BITMAP::mutex | 78705 |

| 2642184 | 646 | wait/io/socket/sql/client_connection | 16933023 |

| 2642184 | 647 | wait/synch/mutex/sql/THD::LOCK_thd_query | 174582 |

| 2642184 | 638 | wait/synch/sxlock/innodb/hash_table_locks | 48654 |

| 2642184 | 639 | wait/synch/mutex/innodb/log_sys_mutex | 32913 |

| 2642184 | 640 | wait/synch/mutex/innodb/rw_lock_list_mutex | 34344 |

| 2642185 | 144 | wait/synch/mutex/innodb/rw_lock_list_mutex | 70119 |

| 2642185 | 145 | wait/synch/mutex/innodb/rw_lock_list_mutex | 31482 |

| 2642185 | 146 | wait/synch/mutex/innodb/trx_sys_mutex | 48654 |

| 2642185 | 147 | wait/synch/mutex/innodb/trx_pool_mutex | 37206 |

| 2642185 | 148 | wait/synch/mutex/innodb/trx_mutex | 37206 |

| 2642185 | 149 | wait/synch/mutex/mysys/BITMAP::mutex | 77274 |

| 2642185 | 150 | wait/io/socket/sql/client_connection | 17864604 |

| 2642185 | 151 | wait/synch/mutex/sql/THD::LOCK_thd_query | 110187 |

| 2642185 | 142 | wait/synch/sxlock/innodb/hash_table_locks | 50085 |

| 2642185 | 143 | wait/synch/mutex/innodb/log_sys_mutex | 52947 |

| 2642286 | 179 | wait/synch/mutex/sql/THD::LOCK_query_plan | 52947 |

| 2642286 | 180 | wait/synch/mutex/sql/THD::LOCK_query_plan | 44361 |

| 2642286 | 181 | wait/synch/mutex/sql/LOCK_global_system_variables | 42930 |

| 2642286 | 182 | wait/synch/mutex/sql/THD::LOCK_query_plan | 48654 |

| 2642286 | 183 | wait/io/socket/sql/client_connection | 14777937 |

| 2642286 | 184 | wait/synch/mutex/sql/THD::LOCK_thd_query | 70119 |

| 2642286 | 175 | wait/synch/mutex/sql/LOCK_plugin | 103032 |

| 2642286 | 176 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 124497 |

| 2642286 | 177 | wait/synch/mutex/sql/THD::LOCK_query_plan | 78705 |

| 2642286 | 178 | wait/synch/mutex/sql/LOCK_global_system_variables | 52947 |

| 2642287 | 179 | wait/synch/mutex/sql/THD::LOCK_query_plan | 48654 |

| 2642287 | 180 | wait/synch/mutex/sql/THD::LOCK_query_plan | 42930 |

| 2642287 | 181 | wait/synch/mutex/sql/LOCK_global_system_variables | 44361 |

| 2642287 | 182 | wait/synch/mutex/sql/THD::LOCK_query_plan | 50085 |

| 2642287 | 183 | wait/io/socket/sql/client_connection | 13077909 |

| 2642287 | 184 | wait/synch/mutex/sql/THD::LOCK_thd_query | 140238 |

| 2642287 | 175 | wait/synch/mutex/sql/LOCK_plugin | 124497 |

| 2642287 | 176 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 141669 |

| 2642287 | 177 | wait/synch/mutex/sql/THD::LOCK_query_plan | 60102 |

| 2642287 | 178 | wait/synch/mutex/sql/LOCK_global_system_variables | 48654 |

| 2642288 | 179 | wait/synch/mutex/sql/THD::LOCK_query_plan | 55809 |

| 2642288 | 180 | wait/synch/mutex/sql/THD::LOCK_query_plan | 34344 |

| 2642288 | 181 | wait/synch/mutex/sql/LOCK_global_system_variables | 40068 |

| 2642288 | 182 | wait/synch/mutex/sql/THD::LOCK_query_plan | 50085 |

| 2642288 | 183 | wait/io/socket/sql/client_connection | 12868983 |

| 2642288 | 184 | wait/synch/mutex/sql/THD::LOCK_thd_query | 148824 |

| 2642288 | 175 | wait/synch/mutex/sql/LOCK_plugin | 75843 |

| 2642288 | 176 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 148824 |

| 2642288 | 177 | wait/synch/mutex/sql/THD::LOCK_query_plan | 57240 |

| 2642288 | 178 | wait/synch/mutex/sql/LOCK_global_system_variables | 64395 |

| 2642289 | 189 | wait/io/socket/sql/client_connection | 13810581 |

| 2642289 | 190 | wait/synch/mutex/sql/THD::LOCK_thd_query | 82998 |

| 2642289 | 181 | wait/synch/mutex/sql/LOCK_plugin | 58671 |

| 2642289 | 182 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 124497 |

| 2642289 | 183 | wait/synch/mutex/sql/THD::LOCK_query_plan | 58671 |

| 2642289 | 184 | wait/synch/mutex/sql/LOCK_global_system_variables | 60102 |

| 2642289 | 185 | wait/synch/mutex/sql/THD::LOCK_query_plan | 58671 |

| 2642289 | 186 | wait/synch/mutex/sql/THD::LOCK_query_plan | 35775 |

| 2642289 | 187 | wait/synch/mutex/sql/LOCK_global_system_variables | 42930 |

| 2642289 | 188 | wait/synch/mutex/sql/THD::LOCK_query_plan | 50085 |

| 2642290 | 231 | wait/synch/mutex/sql/THD::LOCK_thd_query | 68688 |

| 2642290 | 232 | wait/synch/mutex/sql/THD::LOCK_query_plan | 101601 |

| 2642290 | 233 | wait/synch/mutex/sql/THD::LOCK_query_plan | 61533 |

| 2642290 | 234 | wait/synch/mutex/sql/THD::LOCK_query_plan | 44361 |

| 2642290 | 235 | wait/synch/mutex/sql/THD::LOCK_query_plan | 38637 |

| 2642290 | 236 | wait/io/socket/sql/client_connection | 17202051 |

| 2642290 | 237 | wait/synch/mutex/sql/THD::LOCK_thd_query | 95877 |

| 2642290 | 227 | idle | 16826172000000 |

| 2642290 | 229 | wait/io/socket/sql/client_connection | 1257849 |

| 2642290 | 230 | wait/synch/mutex/sql/THD::LOCK_thd_data | 247563 |

| 2642303 | 179 | wait/synch/mutex/sql/THD::LOCK_query_plan | 54378 |

| 2642303 | 180 | wait/synch/mutex/sql/THD::LOCK_query_plan | 45792 |

| 2642303 | 181 | wait/synch/mutex/sql/LOCK_global_system_variables | 41499 |

| 2642303 | 182 | wait/synch/mutex/sql/THD::LOCK_query_plan | 48654 |

| 2642303 | 183 | wait/io/socket/sql/client_connection | 8623206 |

| 2642303 | 184 | wait/synch/mutex/sql/THD::LOCK_thd_query | 115911 |

| 2642303 | 175 | wait/synch/mutex/sql/LOCK_plugin | 143100 |

| 2642303 | 176 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 228960 |

| 2642303 | 177 | wait/synch/mutex/sql/THD::LOCK_query_plan | 70119 |

| 2642303 | 178 | wait/synch/mutex/sql/LOCK_global_system_variables | 60102 |

| 2642304 | 179 | wait/synch/mutex/sql/THD::LOCK_query_plan | 48654 |

| 2642304 | 180 | wait/synch/mutex/sql/THD::LOCK_query_plan | 34344 |

| 2642304 | 181 | wait/synch/mutex/sql/LOCK_global_system_variables | 44361 |

| 2642304 | 182 | wait/synch/mutex/sql/THD::LOCK_query_plan | 31482 |

| 2642304 | 183 | wait/io/socket/sql/client_connection | 12547008 |

| 2642304 | 184 | wait/synch/mutex/sql/THD::LOCK_thd_query | 68688 |

| 2642304 | 175 | wait/synch/mutex/sql/LOCK_plugin | 131652 |

| 2642304 | 176 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 131652 |

| 2642304 | 177 | wait/synch/mutex/sql/THD::LOCK_query_plan | 80136 |

| 2642304 | 178 | wait/synch/mutex/sql/LOCK_global_system_variables | 57240 |

| 2642305 | 179 | wait/synch/mutex/sql/THD::LOCK_query_plan | 50085 |

| 2642305 | 180 | wait/synch/mutex/sql/THD::LOCK_query_plan | 32913 |

| 2642305 | 181 | wait/synch/mutex/sql/LOCK_global_system_variables | 44361 |

| 2642305 | 182 | wait/synch/mutex/sql/THD::LOCK_query_plan | 32913 |

| 2642305 | 183 | wait/io/socket/sql/client_connection | 8422866 |

| 2642305 | 184 | wait/synch/mutex/sql/THD::LOCK_thd_query | 60102 |

| 2642305 | 175 | wait/synch/mutex/sql/LOCK_plugin | 124497 |

| 2642305 | 176 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 137376 |

| 2642305 | 177 | wait/synch/mutex/sql/THD::LOCK_query_plan | 87291 |

| 2642305 | 178 | wait/synch/mutex/sql/LOCK_global_system_variables | 45792 |

| 2642306 | 179 | wait/synch/mutex/sql/THD::LOCK_query_plan | 48654 |

| 2642306 | 180 | wait/synch/mutex/sql/THD::LOCK_query_plan | 35775 |

| 2642306 | 181 | wait/synch/mutex/sql/LOCK_global_system_variables | 45792 |

| 2642306 | 182 | wait/synch/mutex/sql/THD::LOCK_query_plan | 32913 |

| 2642306 | 183 | wait/io/socket/sql/client_connection | 8314110 |

| 2642306 | 184 | wait/synch/mutex/sql/THD::LOCK_thd_query | 52947 |

| 2642306 | 175 | wait/synch/mutex/sql/LOCK_plugin | 141669 |

| 2642306 | 176 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 183168 |

| 2642306 | 177 | wait/synch/mutex/sql/THD::LOCK_query_plan | 80136 |

| 2642306 | 178 | wait/synch/mutex/sql/LOCK_global_system_variables | 67257 |

| 2642307 | 189 | wait/io/socket/sql/client_connection | 8325558 |

| 2642307 | 190 | wait/synch/mutex/sql/THD::LOCK_thd_query | 62964 |

| 2642307 | 181 | wait/synch/mutex/sql/LOCK_plugin | 105894 |

| 2642307 | 182 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 323406 |

| 2642307 | 183 | wait/synch/mutex/sql/THD::LOCK_query_plan | 64395 |

| 2642307 | 184 | wait/synch/mutex/sql/LOCK_global_system_variables | 58671 |

| 2642307 | 185 | wait/synch/mutex/sql/THD::LOCK_query_plan | 38637 |

| 2642307 | 186 | wait/synch/mutex/sql/THD::LOCK_query_plan | 32913 |

| 2642307 | 187 | wait/synch/mutex/sql/LOCK_global_system_variables | 45792 |

| 2642307 | 188 | wait/synch/mutex/sql/THD::LOCK_query_plan | 50085 |

| 2642356 | 179 | wait/synch/mutex/sql/THD::LOCK_query_plan | 50085 |

| 2642356 | 180 | wait/synch/mutex/sql/THD::LOCK_query_plan | 34344 |

| 2642356 | 181 | wait/synch/mutex/sql/LOCK_global_system_variables | 64395 |

| 2642356 | 182 | wait/synch/mutex/sql/THD::LOCK_query_plan | 32913 |

| 2642356 | 183 | wait/io/socket/sql/client_connection | 9964053 |

| 2642356 | 184 | wait/synch/mutex/sql/THD::LOCK_thd_query | 71550 |

| 2642356 | 175 | wait/synch/mutex/sql/LOCK_plugin | 64395 |

| 2642356 | 176 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 218943 |

| 2642356 | 177 | wait/synch/mutex/sql/THD::LOCK_query_plan | 51516 |

| 2642356 | 178 | wait/synch/mutex/sql/LOCK_global_system_variables | 64395 |

| 2642357 | 179 | wait/synch/mutex/sql/THD::LOCK_query_plan | 42930 |

| 2642357 | 180 | wait/synch/mutex/sql/THD::LOCK_query_plan | 42930 |

| 2642357 | 181 | wait/synch/mutex/sql/LOCK_global_system_variables | 42930 |

| 2642357 | 182 | wait/synch/mutex/sql/THD::LOCK_query_plan | 34344 |

| 2642357 | 183 | wait/io/socket/sql/client_connection | 8930871 |

| 2642357 | 184 | wait/synch/mutex/sql/THD::LOCK_thd_query | 80136 |

| 2642357 | 175 | wait/synch/mutex/sql/LOCK_plugin | 68688 |

| 2642357 | 176 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 107325 |

| 2642357 | 177 | wait/synch/mutex/sql/THD::LOCK_query_plan | 64395 |

| 2642357 | 178 | wait/synch/mutex/sql/LOCK_global_system_variables | 57240 |

| 2642358 | 179 | wait/synch/mutex/sql/THD::LOCK_query_plan | 40068 |

| 2642358 | 180 | wait/synch/mutex/sql/THD::LOCK_query_plan | 34344 |

| 2642358 | 181 | wait/synch/mutex/sql/LOCK_global_system_variables | 44361 |

| 2642358 | 182 | wait/synch/mutex/sql/THD::LOCK_query_plan | 55809 |

| 2642358 | 183 | wait/io/socket/sql/client_connection | 8627499 |

| 2642358 | 184 | wait/synch/mutex/sql/THD::LOCK_thd_query | 75843 |

| 2642358 | 175 | wait/synch/mutex/sql/LOCK_plugin | 125928 |

| 2642358 | 176 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 130221 |

| 2642358 | 177 | wait/synch/mutex/sql/THD::LOCK_query_plan | 74412 |

| 2642358 | 178 | wait/synch/mutex/sql/LOCK_global_system_variables | 55809 |

| 2642359 | 179 | wait/synch/mutex/sql/THD::LOCK_query_plan | 37206 |

| 2642359 | 180 | wait/synch/mutex/sql/THD::LOCK_query_plan | 32913 |

| 2642359 | 181 | wait/synch/mutex/sql/LOCK_global_system_variables | 45792 |

| 2642359 | 182 | wait/synch/mutex/sql/THD::LOCK_query_plan | 31482 |

| 2642359 | 183 | wait/io/socket/sql/client_connection | 8975232 |

| 2642359 | 184 | wait/synch/mutex/sql/THD::LOCK_thd_query | 80136 |

| 2642359 | 175 | wait/synch/mutex/sql/LOCK_plugin | 141669 |

| 2642359 | 176 | wait/synch/rwlock/sql/LOCK_system_variables_hash | 130221 |

| 2642359 | 177 | wait/synch/mutex/sql/THD::LOCK_query_plan | 121635 |

| 2642359 | 178 | wait/synch/mutex/sql/LOCK_global_system_variables | 64395 |

| 2642360 | 4160 | wait/synch/mutex/sql/THD::LOCK_thd_query | 123066 |

| 2642360 | 4151 | wait/synch/mutex/innodb/trx_mutex | 30051 |

| 2642360 | 4152 | wait/synch/mutex/sql/THD::LOCK_query_plan | 70119 |

| 2642360 | 4153 | wait/synch/mutex/innodb/trx_mutex | 31482 |

| 2642360 | 4154 | wait/synch/mutex/innodb/trx_mutex | 31482 |

| 2642360 | 4155 | wait/synch/mutex/sql/THD::LOCK_thd_data | 61533 |

| 2642360 | 4156 | wait/synch/mutex/sql/LOCK_table_cache | 41499 |

| 2642360 | 4157 | wait/synch/mutex/sql/THD::LOCK_thd_data | 42930 |

| 2642360 | 4158 | wait/synch/mutex/sql/LOCK_table_cache | 32913 |

| 2642360 | 4159 | wait/io/socket/sql/client_connection | 15796809 |

| 2642381 | 179 | wait/synch/mutex/sql/THD::LOCK_query_plan | 42930 |

| 2642381 | 180 | wait/synch/mutex/sql/THD::LOCK_query_plan | 42930 |

| 2642381 | 181 | wait/synch/mutex/sql/LOCK_global_system_variables | 44361 |

| 2642381 | 182 | wait/synch/mutex/sql/THD::LOCK_query_plan | 31482 |

| 2642381 | 183 | wait/io/socket/sql/client_connection | 8689032 |

| 2642381 | 184 | wait/synch/mutex/sql/THD::LOCK_thd_query | 104463 |

| 2642381 | 175 | wait/synch/mutex/sql/LOCK_plugin | 91584 |


本文标题:performance_schema详解一
标题URL:http://ybzwz.com/article/jpsshe.html