Metadata Lock 모니터링

Metadata Lock 모니터링

SELECT b.OBJECT_TYPE, b.OBJECT_SCHEMA, b.OBJECT_NAME,
b.LOCK_TYPE, b.LOCK_STATUS, c.THREAD_ID, c.PROCESSLIST_ID,c.PROCESSLIST_INFO
FROM performance_schema.metadata_locks a JOIN performance_schema.metadata_locks b
ON a.OWNER_THREAD_ID<>b.OWNER_THREAD_ID AND a.OBJECT_NAME=b.OBJECT_NAME
AND a.LOCK_STATUS = 'PENDING'
JOIN performance_schema.threads c
ON b.OWNER_THREAD_ID = c.THREAD_ID;

 


Revision #1
Created 8 September 2023 01:10:08 by 신민항
Updated 8 September 2023 01:14:54 by 신민항