MySQL 8.4 introduced several welcome optimizer
enhancements, including automatic background histogram collection
via the columns_histogram_background_collection
feature. By proactively sampling table data in the background,
MySQL can make highly accurate cardinality estimates, improving
execution plans for complex workloads with zero manual
intervention.
While this feature is a massive win for query performance, Amazon RDS users migrating to MySQL 8.4 are running into a frustrating side effect: severe error log bloat originating from AWS-managed system tables.
If you monitor your RDS MySQL error logs, you will likely see a flood of the following warnings:
[code] [Warning] [MY-015116] [Server]
Background histogram update on mysql.rds_heartbeat2: Lock wait
timeout exceeded; try restarting transaction[/code]
The Architectural Clash
This behavior is not a bug in the …
[Read more]