slow_query_rca
Identifies root causes for the slowest SQL statement digest and proposes concrete actions, analyzing lock time, no-index scans, temp-disk usage, and optional EXPLAIN plans.
Instructions
[READ] RCA for the worst statement digest, with cause + action.
Picks the digest with the greatest total time and maps its numbers (no-index share, lock-time share, examined/sent ratio, tmp-disk spill, calls) — plus an optional EXPLAIN plan — to cited causes and concrete actions. Pass 'statements' for pure/offline analysis, or omit to pull the top digests live from performance_schema.
Args: statements: Injected digest rows (as from top_queries); if omitted, the worst statements are pulled live. explain_sql: Optional SQL to EXPLAIN so plan access types feed the RCA. limit: How many statements to pull when not injected (default 20). target: Target name from config; omit for the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| target | No | ||
| statements | No | ||
| explain_sql | No |