mysql

  • MySQL 8.4, and the defaults that changed underneath us

    The first long-term-support release under the new model, and an application that could not authenticate after a container image bump.

  • A DELETE that should have been a partition drop

    A retention job deleting eleven million rows a month from a partitioned table, one batch at a time, without touching the partition boundary. The partitioning had been done…

  • The service we merged back

    Two services extracted in 2021, a team of four maintaining four pipelines, and forty-one of forty-four releases touching both.

  • The temporary table that spilled to disk every time

    A query creating an internal temporary table that exceeded the in-memory limit on every execution, silently. The ratio of disk to memory temporary tables is the diagnostic and…

  • A histogram on a skewed column, and the plan it fixed

    A status column where one value covers ninety-four per cent of rows, and an optimiser assuming an even distribution. Histograms are for columns that are skewed and not…

  • A module that got its own database and gave it back

    Splitting the billing schema onto its own instance in 2021, and rejoining it three years later because every report crossed the boundary. The reason given in 2021 was…

  • A composite index in the wrong column order

    An index on (created_at, status) serving a query that filters on status and ranges on date, which uses the first column and stops. The rule is equality columns…

  • A soft delete that broke a unique index

    A unique index on email, and a soft delete that leaves the row in place, which means an address can never be reused. The generated column is null…

  • The unique index we could not add, and the duplicates we had to find first

    A constraint that should have existed since 2016, and 1,240 rows that violate it. Support merging customer records by hand, monthly.

  • The online DDL that was not online

    ALGORITHM=INPLACE does not mean lock-free, and the operation that needed a table rebuild took a metadata lock at the end anyway. Specifying LOCK=NONE turns an unpleasant surprise into…