【Mysql】 sql语句查询慢问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/w372426096/article/details/87931334

查询时间长不返回

等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;查看线程状态

等行锁

 

猜你喜欢

转载自blog.csdn.net/w372426096/article/details/87931334