MySQL Slow Query Diagnosis
- Resolve the exact monitor and confirm it is a MySQL or MariaDB monitor.
- Use
database.mysql_slow_queriesto identify expensive query patterns. - Use
database.mysql_process_listto inspect currently active work. - Use
database.mysql_lock_waitswhen concurrency or blocking may be involved. - Use
database.mysql_global_statuswith a focused pattern for relevant server counters. - Use
database.explain_queryonly when the user supplied a concrete SELECT statement that needs plan analysis. - Correlate the observations before recommending indexes, SQL changes, or server tuning.
- Separate evidence, inference, and recommendations in the final Markdown report.
Never request database credentials. Use only credentials already configured on the HertzBeat monitor.