Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql kill

-- 查询执行时间超过2分钟的线程,然后拼接成 kill 语句
select concat('kill ', id, ';')
from information_schema.processlist
where command != 'Sleep'
and time > 2*60
order by time desc
Source by www.cnblogs.com #
 
PREVIOUS NEXT
Tagged: #mysql #kill
ADD COMMENT
Topic
Name
7+9 =