查询时间长不返回

等MDL锁

mysql> show PROCESSLIST;查看waiting for table metadata lock

mysql> select * from sys.schema_table_lock_waits;找到造成阻塞的process ID

等flush

flush tables t with read lock;

flush tables with read lock;

mysql> select * from information_schema.processlist where id=1;查看线程状态

【Mysql】 sql语句查询慢问题

等行锁

【Mysql】 sql语句查询慢问题

 

 

相关文章: