Adding a new column to a database table is easy to do wrong. The SQL ALTER TABLE statement can block writes, lock the table, or trigger long-running migrations if the dataset is large. The impact depends on the database engine, the size of the table, and how your system handles schema changes in production.
In PostgreSQL, ALTER TABLE ADD COLUMN is generally fast for nullable fields without a default value. With a default, the database rewrites the table if it has to backfill existing rows. That rewrite can lock the table for the duration. MySQL and MariaDB have similar behavior, but support for instant add-column operations depends on the storage engine and version.
When you add a new column, plan the operation. For zero-downtime deployments, avoid schema changes that rewrite or reorganize data. Backfill in smaller batches to prevent production stalls. Add the column without a default, deploy code that writes future values, then backfill historical data asynchronously. Once backfill is complete, set the default and make the column NOT NULL if required.