天天看點

小技巧:mysql批量處理線程超容易

前言:在mysql日常維護中都是通過show processlist;來檢視mysql正在執行的線程。
show processlist;
select * from information_schema.processlist
           
select concat('kill ',ID,';') 
from information_schema.processlist 
where USER='www' and STATE='updating' and INFO like 'DELETE FROM %' 
order by ID asc;