Archive
mysql
-
The GitHub Actions workflow I keep copying into PHP projects
One CI workflow I have been pasting between PHP repositories for a year and a half, explained line by line: the PHP matrix, Composer caching, a MySQL service container, and the health check that lies.
-
Redis in front of a report that was still slow
Caching a nine second aggregate report cut the median to 81 milliseconds and pushed the p99 to nearly fifteen seconds, because every expiry started a stampede. What the lock, the stale copy and the cache keys look like now.
-
Doctrine migrations, and why the Friday deploy broke
A generated diff, a NOT NULL column with no default, and a deploy that ran migrations before it flipped the symlink. 213 failed inserts on a Friday evening, and the expand and contract ordering I should have used.
-
MySQL 5.7 JSON columns, and the regrets that followed
A support lookup read 2.4 million rows to return 41 of them, because the predicate sat inside a JSON document. The generated column fix, the two details that broke it first, and what I keep out of documents now.
-
EXPLAIN, and the report that took forty seconds
A finance report on the ERP took 41 seconds against 1.9 million invoices. The slow query log, EXPLAIN, one index that was never used, and the composite index that finally worked on MySQL 5.5.