检查sql语句占用多大内存和耗时;
主要是用到information_schema库
命令:select p.user,p.host,p.ID,p.memory_used,t.trx_started,p.INFO from information_schema.processlist as p inner join information_schema.innodb_trx as t on t.trx_mysql_thread_id=p.ID order by t.trx_started desc limit 10 ;
检查目前系统打开了哪些表
show open tables;
检查innodb引擎目前问题点在哪
show engine innodb status;
网友评论