Analyse de requêtes (Digest)
Digest collection
PmaControl integrates Performance Schema to collect and analyze SQL queries:
- Automatic collection via
Digest::integrate()triggered by the Listener - Query normalization (
Query::normalize()) to group variants - SHA-256 digest computation (
statement_digest) - Automatic table extraction from SQL queries
Analysis and EXPLAIN
For each digest, PmaControl provides:
- Execution count, total time, average time, rows examined, rows sent
- Visual EXPLAIN (
Myxplain.php) with full-scan and missing index detection - Performance history to detect regressions
- Server comparison (same digest on master vs replica)
Performance Schema configuration
To enable digest collection, Performance Schema must be enabled:
[mysqld]
performance_schema = ON
performance_schema_digests_size = 10000
performance_schema_max_digest_length = 1024
PmaControl collects digests from
performance_schema.events_statements_summary_by_digest. No modification to your queries is needed.