Checklists / MySQL

The MySQL production and performance checklist.

37 checks across configuration, backups and recovery, monitoring, indexes and queries, schema and table maintenance, connections and pooling, security, high availability and upgrades. Tick items off as you go. Your progress is saved in this browser.

0 of 37 complete

1. Configuration

2. Backups and recovery

3. Monitoring

Top 10 statements by total latency (sys schema)

SELECT query, exec_count, total_latency, avg_latency, rows_examined_avg
FROM sys.statement_analysis
ORDER BY total_latency DESC
LIMIT 10;

4. Indexes and queries

Indexes that have not been used since the server started

SELECT object_schema, object_name, index_name
FROM sys.schema_unused_indexes;

5. Schema and table maintenance

Tables without a primary key

SELECT t.table_schema, t.table_name
FROM information_schema.tables t
LEFT JOIN information_schema.table_constraints c
  ON c.table_schema = t.table_schema
 AND c.table_name = t.table_name
 AND c.constraint_type = 'PRIMARY KEY'
WHERE t.table_type = 'BASE TABLE'
  AND c.constraint_name IS NULL
  AND t.table_schema NOT IN ('mysql', 'sys', 'information_schema', 'performance_schema');

6. Connections and pooling

7. Security

8. High availability and upgrades

Want this done for you?

I run a fixed-price MySQL performance audit: slow query analysis, indexing, InnoDB configuration, and upgrades, on RDS, Cloud SQL, or self-hosted. You get a written report with a prioritized fix list and expected impact, delivered in one week.

Frequently asked questions

What should innodb_buffer_pool_size be set to?

On a dedicated database server, 50-75% of RAM is a common starting point, and the manual cites up to 80%. Leave room for per-connection buffers and the operating system. Managed services such as RDS often set it for you, so check the parameter group.

How do I find slow queries in MySQL?

Enable the slow query log and summarize it with pt-query-digest, or query sys.statement_analysis to rank statements by total latency. Then run EXPLAIN ANALYZE on the top ones to see where the time goes.

Does every MySQL table need a primary key?

Yes. InnoDB organizes data around the primary key, and without one it creates a hidden key you can't use. Replication, especially row-based, also performs much better when tables have primary keys.

Do I need ProxySQL or another connection pooler?

If your application opens many short-lived connections, or you run many application instances, a pooler usually helps. MySQL uses a thread per connection, so thousands of direct connections hurt performance even when most are idle.

How often should I test restoring my MySQL backups?

At least quarterly, and after any change to the backup setup. Time the restore so you know your real recovery time, not the one you assume.

Should I use TidesDB instead of InnoDB?

Not as a default. TidesDB is an LSM-tree storage engine that can suit write-heavy, delete-heavy, or large-value tables, and its vendor benchmarks show large gains over InnoDB. But the MySQL 9.7 plugin is new: Percona calls it a serious experiment and says it wouldn't point production traffic at it yet, and replication and foreign keys are not supported in that build. Test it on a copy of your data, and keep InnoDB for anything that depends on replication or crash-safe schema changes.

Related