MySQL如何查询当前正在运行的SQL语句 |
|
本文标签:MySQL SQL语句 通过status命令,查看Slow queries这一项,如果值长时间>0,说明有查询执行时间过长 以下是引用片段:
mysql> show processlist; +----+------+-----------+------+---------+------+-------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+------+-----------+------+---------+------+-------+------------------+ | 53 | root | localhost | NULL | Query | 0 | NULL | show processlist | +----+------+-----------+------+---------+------+-------+------------------+ |