A column named customer_id with no constraint, and 312 rows pointing at customers that had been deleted. Deciding what to do with the orphans is the work —…
Updating four million rows in one statement holds a transaction open long enough for the replica to fall twenty minutes behind. The sleep is not politeness, it is…
The optimiser chose a plan based on an estimate of 200 rows where the real answer was 8,000, and only the actual execution shows the difference. The gap…
Filtering on a value inside a JSON array was a full scan until 8.0.17 added multi-valued indexes, and the syntax is unforgiving. The ARRAY keyword in the cast…
Publishing to a broker inside a database transaction is two systems and one commit, which cannot be made atomic. The index on (published_at, id) with nulls first is…
A billing module everybody agrees should be separate, a team of four, and 88 classes that reference it. The boundary, drawn in code rather than in conversation.
InnoDB full-text ignores words shorter than three characters and words appearing in more than half the rows, and both are configurable only at the server level. Changing innodb_ft_min_token_size…