Howto log slow MySQL Queries in Debian
Sometimes MySQL use a lot of CPU and its really slow.
If you want to log the queries just comment out following lines in '/etc/mysql/my.cnf'
# Here you can see queries with especially long duration
log_slow_queries = /var/log/mysql/mysql-slow.log
long_query_time = 10
If a query need more then 10 seconds to get executed mysql will log it in '/var/log/mysql/mysql-slow.log'
Similar entries
- #2006 - MySQL server has gone away
- url encode decode directly with mysql
- Using shared same Mysql Data dir on multiOS Linux+Windows Laptop
- Mysql replace with regexp
- Backup all MySQL databases automagicly with the PHP admin script
- Import big SQL Files under WAMP or LAMP ?
- Mysql update table if field exists
- Mysql: update weight by an auto-incremented string created on the fly
- Mysql Order / Sort by before Group by
- #1045 Cannot log in to the MySQL server (PhpMyAdmin 2.4.8)
- Free Web-Hosting with PHP-MYSQL, FTP and no-ads
- Case-insensitive replace with Mysql
- Import Dmoz / ODP data to mysql
- [Howto Fix] Table './eximstats/sends' is marked as crashed and should be repaired
- Mysql Dump import export restore
- Replace string in big database or large text file
- How install Apache, Mysql and PHP on Notebook
- What is the difference between Mysql inner and outer join?
- Page generation time and http-referers with PHP
- What does a Webdesigner need: Tools and Knowledge List

Comments
Post new comment