show processlist;
SHOW FULL PROCESSLIST用来显示完整的Info列信息,等价于:
select * from information_schema.processlist;
https://learnku.com/articles/62426

show open tables where in_use > 0 ;
SELECT * FROM performance_schema.events_statements_current LIMIT 0,20
SELECT * FROM performance_schema.events_transactions_current LIMIT 0,20
SELECT * FROM performance_schema.events_waits_current LIMIT 0,20
SELECT * FROM performance_schema.metadata_locks LIMIT 0,20
SELECT * FROM performance_schema.mutex_instances LIMIT 0,20
SELECT * FROM performance_schema.threads LIMIT 0,20

select * from information_schema.innodb_lock_waits;
select * from information_schema.innodb_locks;
SELECT * FROM information_schema.INNODB_TRX;

mysql 8.0.* 之前的版本使用该方式查询

SELECT * FROM information_schema.INNODB_LOCKS

mysql 8.0.1 之后的版本使用

SELECT * FROM performance_schema.data_locks

作者:admin  创建时间:2024-10-13 11:41
最后编辑:admin  更新时间:2025-09-19 10:08