Fixes
- MySQL · Fix
MySQL CPU at 90% but the slow query log is empty
When MySQL's CPU is pinned and the slow query log shows nothing, the cost is usually a fast statement run very often. How to find it in performance_schema and what to do about it.
Scripts
- MySQL · Script
MySQL statements that examine far more rows than they return
Find the statements that read thousands of rows to return a handful, usually a missing or unusable index, from performance_schema's digest summary.
- MySQL · Script
pt-query-digest on RDS when the slow log is a table (log_output=TABLE)
pt-query-digest only reads slow-log files. This rebuilds the last N minutes of mysql.slow_log as one, with microsecond timings, and runs the report, from cron or by hand.
How-tos
- MySQL · How-to
AWR for MySQL: snapshots of performance_schema statement digests
Keep 5-minute snapshots of events_statements_summary_by_digest, with the host's CPU, so you can ask what ran during last night's spike and compare it with a normal hour.
New fixes and field notes by email
New KB entries and HASHJOIN Field Notes on running production database fleets. About once a month, no spam.