--查看连接信息以及连接执行的命令 show processlist --查看当前被锁住的表 show open tables where in_use > 0; --开启会话级别的profile set profiling=1 --查看所有的数据库操作执行过程 show profiles --查询单条语句profile show profile for query 1 --查看整个数据库服务的线程数 show global status like 'thread%'; --刷新会话级别的计数器 flush status --查看当前会话的状态信息 show status --查看所表参数信息 show table status --查询持续时间大于一秒的事务 select * from information_schema.innodb_trx where time_to_sec(timediff(now(), trx_started)) > 1
pt-query-digest mysql-slow --since '2016-01-23 00:00:00' --until '2016-01-23 23:59:59' --limit 5
如对本文有疑问, 点击进行留言回复!!
MySQL-关系代数-并、交、差、等值连接、自然连接、左连接。。。
【MySQL牛客】10.获取所有非manager的员工emp_no
网友评论