MySql Query Optimization

You can turn on the slow query logs in configrations and then see logs by mysqldumpslow command

 

You can optimize your queries with explain command

 

MySQL Explain has different row count than slow query log. Try the below command to get more stats.