The table was running hot, but the numbers were wrong. A single missing field broke every query. The solution was simple: add a new column. The cost of doing it wrong was not.
Adding a new column in a relational database is not a casual operation. Schema changes cascade through migrations, indexes, query plans, and application code. A naive ALTER TABLE on a large dataset can lock writes for minutes or even hours, blocking traffic and burning caches. Without a plan, you risk data integrity, downtime, and rollback complexity.
First, decide if the new column is nullable or if it needs a default value. In PostgreSQL, adding a nullable column with no default is fast, metadata-only. Adding a non-null column with a default will rewrite the whole table, which can be expensive. If you need a populated default, consider adding it as nullable first, backfilling rows in batches, then enforcing constraints in a second step.
Second, check for index impact. If you plan to index the new column, create the index concurrently to avoid locking writes. In MySQL, especially with InnoDB, understand whether your version supports instant DDL or requires table copy operations.