by simonw · 5y ago · 0 comments
Unfortunately, in my experience once you are operating at scale they are expensive, slow and fraught with peril.
The result is that engineering teams often chose to build poorly designed schemas and take on technical debt rather than make a schema change to a core table. This is a terrible anti-pattern!
I'm massively in favour of anything that makes schema changes cheaper and more boring. I really enjoy working with the Django schema migration system for this reason - though it won't help you as much if you need to make schema changes to older versions of MySQL (I've not tried schema changes against 8.0 yet) since you'll likely still need to use GitHub ghost or Percona pt-online-schema-change.
begin tran
..refactor data, drop/create tables..
..create backwards-compatible views..
commit
..against a live database without risking consistencythat's what the backwards-compatible views are for
disclaimer: I work at PlanetScale
I'd much rather use a robust, performant real schema migrations tool though.