Adding a new column should be simple. In practice, it decides whether your database stays fast or grinds under load. The wrong approach locks rows, spikes latency, or drops connections. The right one slides in without a ripple.
First, decide if the new column is nullable or has a default value. Adding a column with a default in large tables can rewrite the entire dataset. That can take minutes or hours, halting writes. Instead, add the column as nullable, backfill in small batches, then add constraints.
Second, check your replication. On PostgreSQL, a blocking ALTER TABLE can stall replication lag. On MySQL, certain column changes rebuild the table. Test the operation in staging with production-scale data.
Third, consider index creation. An index on a new column speeds queries but increases write overhead. Create indexes after backfilling to avoid wasted rebuilds. On large datasets, use concurrent or online index creation options.