首先开启events_waits_current启用状态 代码语言:javascript 复制 #先开启events_waits_current的状态SELECT*from setup_consumers where name='events_waits_current';UPDATEperformance_schema.setup_consumersSETenabled='YES'WHEREname='events_waits_current';--查看等待事件的启用状态SELECT*from setup_consumers where n...
events_waits_current表包含当前的等待事件信息,每个线程只显示一行最近监视的等待事件的当前状态 在所有包含等待事件行的表中,events_waits_current表是最基础的数据来源。其他包含等待事件数据表在逻辑上是来源于events_waits_current表中的当前事件信息(汇总表除外)。例如,events_waits_history和events_waits_history_lon...
· 当一个线程尝试获取已经被某个线程持有的互斥体时,在events_waits_current表中会显示尝试获取这个互斥体的线程相关等待事件信息,显示它正在等待的mutex 类别(在EVENT_NAME列中可以看到),并显示正在等待的mutex instance(在OBJECT_INSTANCE_BEGIN列中可以看到); · 当线程成功锁定(持有)互斥体时: * events_waits_...
mysql> select * from events_waits_current\G*** 1. row ***THREAD_ID: 13EVENT_ID: 485END_EVENT_ID: 485EVENT_NAME: wait/synch/mutex/innodb/buf_dblwr_mutexSOURCE:TIMER_START: 6364820648454270TIMER_END: 6364820648844465TIMER_WAIT: 390195SPINS: NULLOBJECT_SCHEMA: NULLOBJECT_NAME: NULLINDEX_NAME:...
2.CURRENT EVENT table 最近的事件表,例如events_waits_current包含每个线程最近的事件 2.1.events_waits_current 该表列出了当前线程正在等待的事件,主要包括以下几列: THREAD_ID:线程ID EVENT_ID:当前线程的事件ID,和THREAD_ID组成一个Primary Key. END_EVENT_ID:当事件开始时,这一列被设置为NULL。当事件结束时...
For information about configuring whether to collect wait events, see Section 29.12.4, “Performance Schema Wait Event Tables”. The events_waits_current table has these columns: THREAD_ID, EVENT_ID The thread associated with the event and the thread current event number when the event starts...
WRITE_LOCKED_BY_THREAD_ID为正在持有该对象的thread_id,若没有线程持有,则为NULL,READ_LOCKED_BY_COUNT为记录了同时有多少个读者持有读锁。通过 events_waits_current 表可以知道,哪个线程在等待锁;通过rwlock_instances知道哪个线程持有锁。rwlock_instances的缺陷是,只能记录持有写锁的线程,对于读锁则无能为力。
The events_waits_current table has these columns: THREAD_ID, EVENT_ID The thread associated with the event and the thread current event number when the event starts. The THREAD_ID and EVENT_ID values taken together uniquely identify the row. No two rows have the same pair of values. EN...
Wait表主要包含3个表,events_waits_current,events_waits_history和events_waits_history_long,通过thread_id+event_id可以唯一确定一条记录。current表记录了当前线程等待的事件,history表记录了每个线程最近等待的10个事件,而history_long表则记录了最近所有线程产生的10000个事件,这里的10和10000都是可以配置的。这三...
| events_stages_summary_by_account_by_event_name | | events_stages_summary_by_host_by_event_name | ...省略... | status_by_thread | | status_by_user | | table_handles | | table_io_waits_summary_by_index_usage | | table_