MySQL Performance Tuning Tips and Tricks
A few of the basic settings to get a better performance out of your MySQL server. We are assuming, of course, that the server role is limited to just running MySQL and that is has sufficient memory and disk to meet the application needs. The example in this document uses 16G of RAM. Monitoring Performance MySQL as some logging features to identify slow queries. This configuration logs queries that take longer that 2 seconds to complete. log_slow_queries = /var/log/mysql/mysql-slow.log long_query_time = 2 log-queries-not-using-indexes Then use the tools to evaluate the logs. Using the above configuration the logs will show both slow and non-indexed queries which may be noise. mysqldumpslow /var/log/mysql/mysql-slow.log Count: 1 Time=0.42s (0s) Lock=0.00s (0s) Rows=0.0 (0), debian-sys-maint[debian-sys-maint]@localhost select count(*) into @discard from `information_schema`.`PARTITIONS` Count: 1 Time=0.00s (0s) Lock=0.00s (0s) Rows=0.0 (0), debian-sys-maint[de...