Common commands are as follows:
Consuming up to five sql statement
mysqldumpslow -s t -t 5 /var/log/mysql/slowquery.log
Most visited five sql statement
mysqldumpslow -s c -t 5 /var/log/mysql/slowquery.log
Return record set up five sql statement
mysqldumpslow -s r -t 5 /var/log/mysql/slowquery.log
5 according to time before return sql statement which contains the left connection
mysqldumpslow -t 5 -s t -g "left join" /var/log/mysql/slowquery.log
Parameter Description:
-s: Sort by how
c number of records
t time
l query time
Returns the number of records r
ac at al ar indicate corresponding reverse
-t: top n means
-g: behind you can write a regular pattern matching, case-insensitive