mysql loggin slow queries
开发者_JS百科I ran the mysqltuner script recently and i noticed around 5000 joins done without indexes, this has to be reduced to a small value.
There is an option that allows us to log these queries in mysql
i have added the following lines under [mysqld] section of my.cnf
log-queries-not-using-indexes log_slow_queries=/var/log/mysqld.slow.log
But the logs still remains empty, how can i get the logging to work in order to optimize those queries
Did you restart MySQL after doing this?
sudo service mysql restart
If you didn't, it won't log anything. I've also wondered myself if there's a delay in when it actually logs queries. Give it time, the logs will show up.
精彩评论