📜  mysql kill - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:59.945000             🧑  作者: Mango

代码示例3
-- 查询执行时间超过2分钟的线程,然后拼接成 kill 语句
select concat('kill ', id, ';')
from information_schema.processlist
where command != 'Sleep'
and time > 2*60
order by time desc