May 25, 2012

Post: Troubleshooting MySQL Memory Usage

log ps aux | grep mysqld >> ps.log sleep 60 done Check for Table Cache Related Allocations There are cases when MySQL…you can do better as you can query temporary tables too: mysql> select sum(data_length+index_length…to detect memory leaks like valgrind are too slow to run in production. So the best …

Comment: Too many connections? No problem!

…/mysql/mysql.sock max_connections = 600 wait_timeout = 60 interactive_timeout=1800 skip-name-resolve skip-bdb default-time-zone=America/Caracas log-slow-queries=/var/log/mysql-slow-queries.log long_query_time=15 log-queries-not-using-indexes query_cache_type=1 query_cache_size=32M thread_cache…

Comment: Innodb Performance Optimization Basics

Hi, I am facing major issues with slow query output. The tables are in InnoDB with MySQL 5 and RHEL 5. Its a…/local/mysql/data innodb_buffer_pool_size = 2000M innodb_additional_mem_pool_size = 2M innodb_log_file_size = 65M innodb_log_buffer_size = 8M innodb_flush_log_at_trx_commit = 1 innodb…

Post: MariaDB 5.3 is released as GA!

… last week, so we are a little slow to blog about this and acknowledge the …-class member of the MySQL family of databases. Finally, High Performance MySQL, Third Edition mentions MariaDB …for the binary log makes the server much faster with the binary log enabled Faster queries through speedier joins…

Post: Slow Query Log analyzes tools

Slow Query Log – Especially after the changes to log all queries slow query log may be growing too rapidly to follow, so we implemented slow query log filter (based on parse_mysql_slow_log… passes across same slow query log first to fix worse queries and then come to find more optimization candidates. So “tail -f mysql-slow.log | mysql_slow_log_filter -T…

Comment: Database problems in MySQL/PHP Applications

…length=2048 long-query-time=5 log-slow-queries=/apps/log/slow-query interactive_timeout=300 wait_timeout=300 thread_cache = 40 max_connections=500 query_cache_…2000M;ibdata2:10M:autoextend #innodb_log_group_home_dir = /usr/local/mysql/data/ #innodb_log_arch_dir = /usr/local/mysql/data/ innodb_data_…

Post: How to Identify Bad Queries in MySQL

…and a nonexistent query can’t be bad. Queries, or groups of queries, are bad because they are slow and … how do we find these queries in some input such as a log of queries? It shouldn’t …when the query executed, not merely the duration the query executed for, which has been available in MySQL for…

Post: Be careful rotating MySQL logs

If you enable logging of all queries as “slow queries” using the patch or MySQL 5.1 you can get log file to grow huge. Same may happen with general log… the log file you no more need. It can be also good idea to hook up log rotate to take care of MySQL logs

Post: MySQL Slow query log in the table

As of MySQL 5.1 get MySQL slow query log logged in mysql.slow_log table instead of the file as you had in previous … order query come in the log file. If you used to do tail -100 log-slow.log and now change it to SELECT * FROM slow_log ORDER BY start_time DESC LIMIT 100 you would find new queries coming…

Post: Identifying the load with the help of pt-query-digest and Percona Server

MySQL server, you would see an entry like this in the slow query log: # Time: 111229 3:02:26 # User@Host: msandbox[msandbox] @ localhost [] # Query…. Using pt-query-digest Using pt-query-digest is pretty straight forward: pt-query-digest /path/to/slow-query.log Note that executing pt-query-digest can…