slow_query_log = 1 slow_query_log_file = /var/lib/mysql/slowquery.log long_query_time = 1
Following will show top 5 query which returned maximum rows. It can find queries where you missed LIMIT clause. A common performance killer!
mysqldumpslow -a -s r -t 5 /var/lib/mysql/slowquery.log
Following will sort output by count i.e. number of times query found in slow-log. Most frequency queries sometimes turned out to be unexpected queries!
mysqldumpslow -a -s c -t 5 /var/lib/mysql/slowquery.log