ラッチ確認

(8.0.21)
https://dev.mysql.com/doc/refman/8.0/en/performance-schema-instrument-naming.html

update performance_schema.setup_consumers set enabled = 'YES'
where name like '%waits%';

select * from performance_schema.events_waits_current
where event_name like '%wait/synch%'
;

select * from performance_schema.events_waits_history
where event_name like '%wait/synch%'
;

select * from performance_schema.events_waits_history_long
where event_name like '%wait/synch%'
;


show engine innodb status\G


select * from performance_schema.mutex_instances;
select * from performance_schema.rwlock_instances;
select * from performance_schema.cond_instances;

 

(12cR1)
select * from v$system_event
where event like '%latch%'
or event like '%mutex%'
or event like '%cursor:%'
;


select name,gets,misses,sleeps,wait_time
,100 * wait_time / sum(wait_time) over()
from v$latch;

(11)

select * from pg_stat_activity
where wait_event_type in ('LWLock','BufferPin')
;

 

 

(2019)
https://memorandom-nishi.hatenablog.jp/entry/2016/12/19/011756

select *
from sys.dm_os_wait_stats
where [wait_type] like N'LATCH%'
or [wait_type] like N'PAGELATCH%'
or [wait_type] like N'PAGEIOLATCH%'
;

select latch_class,wait_time_ms,waiting_requests_count
,100.0 * wait_time_ms/ sum(wait_time_ms) over()
from sys.dm_os_latch_stats;