SHEET 03blog/tag/mysql/ REVISED
Writing tagged mysql
2026
-
One DATE() call was locking 1.4 million rows every five minutes
How a function call in a WHERE clause and InnoDB's locking reads in INSERT ... SELECT turned a five-minute cron into a table-wide lock, and the two-line fix.
-
Your "singleton" cron runs on every server
A nightly expiry job ran on every autoscaling instance and expired 94 gift cards twice. What fixed it, and why a time window can't tell a retry from a real repeat.