MySQL & InnoDB (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
What is the Slow Query Log and how do you analyze it with `pt-query-digest`?
senior LevelmysqlAdvanced Internals
In Simple Words:
- Enabled via
slow_query_log = 1andlong_query_time = 1.0(logs queries taking over 1 second). pt-query-digest: Part of Percona Toolkit. Parses massive slow query logs, groups queries by fingerprint (ignoring specific literals), and ranks them by total cumulative execution time, lock wait time, and rows examined.