Adding a new column is one of the most common schema changes. Done wrong, it triggers downtime or locks that stall queries. Done right, it ships in seconds and scales without pain. Whether you’re working with PostgreSQL, MySQL, or a cloud-native data warehouse, the approach matters.
The first step is understanding the storage engine. In PostgreSQL, ALTER TABLE ADD COLUMN is usually metadata-only if you set a default of NULL. In MySQL, online DDL can make it non-blocking if you specify ALGORITHM=INPLACE and the engine supports it. Avoid setting a non-null default that forces a full table rewrite unless required.
Next, consider column ordering. Most systems ignore physical ordering for query performance, so avoid costly “insert-at-position” changes. If you must control order for export or tooling, handle it at the view layer.