This page is original PmaControl documentation. It keeps a practical index structure for MySQL optimization work, without copying third-party content or depending on an external product.
Objective
MySQL tuning reduces latency, stabilizes throughput, and avoids repeated saturation. The work must start from real measurements rather than generic values copied from one server to another.
Recommended Work Order
- Capture the real workload: QPS, latency, errors, connections, disk I/O, memory, and CPU.
- Identify dominant queries with
performance_schema, the slow log, or a digest tool. - Check the schema: missing indexes, redundant indexes, oversized types, and tables without a primary key.
- Tune InnoDB: buffer pool, redo log, flush, I/O threads, and durability strategy.
- Review server limits: connections, open files, table caches, and temporary table sizes.
- Test during a controlled window, with a documented rollback.
Useful Commands
SHOW GLOBAL STATUS LIKE 'Threads_connected';
SHOW GLOBAL STATUS LIKE 'Questions';
SHOW GLOBAL STATUS LIKE 'Innodb_buffer_pool_reads';
SHOW VARIABLES LIKE 'innodb_buffer_pool_size';
Key Point
Good MySQL tuning is incremental. A variable changed without before/after measurement becomes operational debt.