Activate slow queries log

If your mysql database is not as fast as it used to be, maybe it is a good idea to activate the slow queries log. Add the following lines in your .my.cnf file:

CODE:
  1. [mysqld]
  2. log_slow_queries=/var/log/mysql-slow-queries.log
  3. long_query_time=2

All the queries that take more than 2sec to execute will be logged in the /var/log/mysql-slow-queries.log file

One Response to “Activate slow queries log”

  1. Terabanitoss Says:

    Hi
    You are The Best!!!
    Bye

Leave a Reply

You must be logged in to post a comment.