Schema changes look simple until they aren’t. A new column can break queries, trigger lock contention, or spike replication lag. In production, it can block writes and cause real downtime. The key is planning the addition so it lands clean, safe, and fast.
First, decide how the new column will be used. Define its type, default value, and nullability. Avoid defaults that cause a full table rewrite unless absolutely necessary. Use NULL for large tables when you can, and backfill the data in small, controlled batches.
Second, pick a deployment strategy that matches your database. In MySQL, use ALGORITHM=INPLACE or ALGORITHM=INSTANT where available. In PostgreSQL, adding a nullable column without a default is usually instant, but adding one with a default rewrites the entire table. Know the exact behavior in your database version before running the change.
Third, optimize the backfill. Break updates into chunks. Use primary key ranges. Pause between batches to let replication catch up. Monitor CPU, IO, and lag in real time. If you need to index the new column, add the index after the data is populated to reduce impact.