MySQL Performance Tuning Cheat Sheet

Buffer pools, slow queries, and connections

Last Updated: November 21, 2025

Focus Areas

Focus
Tune `innodb_buffer_pool_size` to cover working sets
Watch slow query logs and add indexes where needed

Commands & Queries

SHOW GLOBAL STATUS LIKE 'Threads_connected'
Check connection count
SHOW VARIABLES LIKE 'innodb_buffer_pool_size'
Inspect buffer pool
SET GLOBAL slow_query_log = ON
Enable slow query logging

Summary

Balance buffer pools, connections, and query plans for steady throughput.

💡 Pro Tip: Scale buffer pools to fill RAM and rotate slow query logs routinely.
← Back to Databases & APIs | Browse all categories | View all cheat sheets