mysql查看锁表情况

mysql> show status like 'Table%';

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

| Variable_name        | Value |

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

| Table_locks_immediate | 105         |

| Table_locks_waited   | 3           |

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

 

Table_locks_immediate  指的是能够立即获得表级锁的次数

Table_locks_waited  指的是不能立即获取表级锁而需要等待的次数

 

查看正在被锁定的的表

show OPEN TABLES where In_use > 0;

 

posted @ 2016-12-03 15:48  rorshach  阅读(73313)  评论(0编辑  收藏  举报