查看slow日志,如下:
# cat /data/mysql-3306/data/mysql-slow.log|grep Query_time|sort -rn|more
# Query_time: 2.217110 Lock_time: 0.000138 Rows_sent: 71 Rows_examined: 403624
# Query_time: 1.834154 Lock_time: 0.000120 Rows_sent: 19 Rows_examined: 416850
# Query_time: 1.776122 Lock_time: 0.000158 Rows_sent: 19 Rows_examined: 416850
# Query_time: 1.499109 Lock_time: 0.000120 Rows_sent: 69 Rows_examined: 414278
# Query_time: 1.466662 Lock_time: 0.000060 Rows_sent: 5 Rows_examined: 341737
# Query_time: 1.455110 Lock_time: 0.000042 Rows_sent: 5 Rows_examined: 341737
# Query_time: 1.443143 Lock_time: 0.000042 Rows_sent: 5 Rows_examined: 341737
# Query_time: 1.426235 Lock_time: 0.000091 Rows_sent: 10 Rows_examined: 416891
# Query_time: 1.425995 Lock_time: 0.000051 Rows_sent: 5 Rows_examined: 341737
# Query_time: 1.393112 Lock_time: 0.000063 Rows_sent: 5 Rows_examined: 341737
# Query_time: 1.370813 Lock_time: 0.000044 Rows_sent: 5 Rows_examined: 341737
# Query_time: 1.360219 Lock_time: 0.000063 Rows_sent: 5 Rows_examined: 341737
# Query_time: 1.352684 Lock_time: 0.000069 Rows_sent: 5 Rows_examined: 341737
# Query_time: 1.349179 Lock_time: 0.000062 Rows_sent: 5 Rows_examined: 341737
# Query_time: 1.336438 Lock_time: 0.000129 Rows_sent: 32 Rows_examined: 418371
# Query_time: 1.323875 Lock_time: 0.000136 Rows_sent: 40 Rows_examined: 448992
# Query_time: 1.300740 Lock_time: 0.000210 Rows_sent: 69 Rows_examined: 414140
# Query_time: 1.296301 Lock_time: 0.000041 Rows_sent: 5 Rows_examined: 341303
# Query_time: 1.288829 Lock_time: 0.000055 Rows_sent: 5 Rows_examined: 341737