E:\web\mysql\bin\mysqld, Version: 5.4.3-beta-community-log (MySQL Community Server (GPL)). started with:
TCP Port: 3306, Named Pipe:(null)
Time Id Command Argument
可以通过如下的命令来查看慢查询的记录数:
mysql> show global status like ‘%slow%’; +———————+——-+ | Variable_name | Value | +———————+——-+ | Slow_launch_threads | 0 | | Slow_queries | 0 | +———————+——-+ 生成了日志我们可以使用mysqlsla慢查询日志分析工具来进行处理具体看例子.
一、mysqlsla的安装
wget http://hackmysql.com/scripts/mysqlsla-2.03.tar.gz tar zvxf mysqlsla-2.03.tar.gz cd mysqlsla-2.03 perl Makefile.PL make make install 二、使用参数说明