Performance Schema and sys schema (if installed) list wait events, slow statements, and index usage—ops tooling beyond EXPLAIN.
Sample queries
SELECT * FROM performance_schema.events_statements_summary_by_digest
ORDER BY SUM_TIMER_WAIT DESC LIMIT 5;Requires appropriate privileges—use on staging clones first.
Practice: Review in local or staging only.
When to use
When slow query log shows pain but EXPLAIN on one id is not enough—find top digests across traffic.
Important interview questions and answers
- Q: Performance Schema cost?
A: Some overhead—enable selectively in troubleshooting windows. - Q: sys schema?
A: Friendly views atop Performance Schema for DBAs.
Self-check
- What does digest group?
- When use vs single EXPLAIN?
Tip: Use sys schema on staging clones if installed.
Interview prep
- Digest?
Groups similar query patterns for aggregate stats.
- sys schema?
Simplified views for common DBA questions.