Resources on WordPress Monitoring slow queries in MySQL

Monitoring slow queries in MySQL

If you are in doubt that some really slow queries are taking place on your server and they put you on too much load, then use this change in the configuration file to enable logging of slow queries:

The config files usually is /etc/mysql/my.cnf. Uncomment these:

slow-query-log = 1

slow-query-log-file = /var/log/mysql/mysql-slow.log

long_query_time = 1


The last is not mandatory, but if you got a big db, it would be good if you have a reason to consider indexes, if you got too many queries without ’em.

You can read more here:

Analyse slow-query-log using mysqldumpslow & pt-query-digest


Leave a Reply

Your email address will not be published. Required fields are marked *