This document provides key points for tuning MySQL performance after installation. It recommends adjusting several InnoDB parameters like innodb_buffer_pool_size, innodb_buffer_pool_instances, and innodb_log_file_size based on system RAM and load. It also suggests building indexes on application tables based on data access patterns, identifying full table scan queries, enabling the slow query log, using EXPLAIN to analyze query execution plans, and leveraging tools like MySQL Tuner and the performance schema to monitor database performance and troubleshoot issues.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
29 views
Mysql Performance Tuning Key Points
This document provides key points for tuning MySQL performance after installation. It recommends adjusting several InnoDB parameters like innodb_buffer_pool_size, innodb_buffer_pool_instances, and innodb_log_file_size based on system RAM and load. It also suggests building indexes on application tables based on data access patterns, identifying full table scan queries, enabling the slow query log, using EXPLAIN to analyze query execution plans, and leveraging tools like MySQL Tuner and the performance schema to monitor database performance and troubleshoot issues.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
MySQL Performance tuning key points
After installation look at the parameters of MySQL
o Innodb_buffer_pool_size: Adjust the value 50%-70% of total system RAM o innodb_buffer_pool_instances: Value between 1 and 64. useful in highly concurrent workload as it may reduce contention o innodb_log_file_size: Need to set as per load of database. Can’t greater than buffer_pool_size o innodb_log_buffer_size: 4-8MB is good initial value. Need adjust as per requirement. o innodb_flush_log_at_trx_commit: Depends on database behaviour o innodb_flush_method: use O_DIRECT to enable direct IO for linux system o max_binlog_size: 1G o innodb_io_capacity and innodb_io_capacity_max (for SSD disks) o query_cache_size: use for caching query results. By default, it is disable. Build indexes on application tables based on data access patterns o Primary/Unique Indexes o Regular indexes o Function-based indexes Look for the full table scan queries and make indexes on them Get slow query log by enabling parameters o slow_query_log = /var/log/mysql/mysql-slow.log o long_query_time = 1 o log-queries-not-using-indexes = 1 Use EXPLAIN tool for detailed SQL query execution plan MySQL Tuner script gives overview and quick scan for database show engine performance_schema status; o gives detailed information how database is running MySQL Workbench for performance monitoring Query performance schema table of MySQL to get knowledge how and where database facing issue.