Adding a new column is one of the most common schema changes in modern application development. It sounds simple, but the wrong move can lock tables, slow queries, or trigger downtime in production. The right approach depends on your database engine, your workload, and your deployment strategy.
In PostgreSQL, adding a column with a default value will rewrite the table, which can be expensive on large datasets. Adding it without a default and then updating rows in batches avoids that cost. In MySQL, ALTER TABLE creates a new copy of the table, making it essential to assess size and concurrency impact before running in production. Column ordering is mostly cosmetic, but in certain storage engines it can have implications for index performance.
When the new column is not nullable, consider creating it as nullable first, backfilling values in controlled batches, and only then enforcing NOT NULL. This staged process keeps migrations safe under load. For high-throughput systems, online schema change tools like pt-online-schema-change or gh-ost allow you to add columns without blocking writes.