NOTE

MySQL Slow Query Log

Capturing expensive statements for plan analysis and workload prioritization.

DatabasesCreated Updated 1 min readhistorical

This is a historical learning note and may contain outdated or incomplete understanding.

The slow query log records statements that meet configured timing/inspection criteria and is useful for finding expensive recurring queries. Aggregate by normalized query shape so one hot pattern is not hidden behind many literal variants.

Execution time alone is not enough: inspect rows examined/sent, lock time, frequency, and total resource contribution. Then validate candidates with execution plans and representative data before changing indexes or SQL.

Loading helpful count