Creating a new column is one of the most common changes in any production database. It sounds simple. It is not. The moment you ALTER TABLE on a large dataset, you risk locking writes, affecting latency, and triggering unwanted downtime. Engineers know these tradeoffs. The real question is how to add a new column fast, safely, and with zero user impact.
First, define the schema change precisely. Choose the data type carefully; changing it later can be far more costly than getting it right the first time. Decide on nullability. If a default is required, plan whether it will be applied at creation or populated in a separate, controlled migration. Direct defaults can rewrite the entire table in some engines, blocking concurrent operations.
Second, choose the right migration pattern. For Postgres, adding a nullable column without a default is instant. In MySQL, large tables may still lock, depending on the storage engine and configuration. When performance matters, break the operation into steps: