Zero-downtime database migrations

Part 3: Changing schemas safely

A composite index in the right column order took the query from four hundred milliseconds to two. The wrong order would have done nothing at all.

Premature optimization is the root of all evil, but a missing index is just a bug.

Tomás Reyes

5 comments on “Zero-downtime database migrations”

    1. Elin Sørensen

      Good question. It took about three weeks, most of it waiting for review and measuring the results.

  1. Luis Ortega

    Bookmarked. The part about writing things down before changing anything is underrated.

  2. Clara Lindqvist

    This matches our experience almost exactly, down to the part where the slow tail took longest to fix.

Leave a comment

Your email address will not be published. Required fields are marked *