Adding a new column sounds simple until it is not. Schema changes in production are rarely casual. They can lock tables, spike CPU, and stall requests. The wrong approach can turn a one-minute tweak into a system outage.
In SQL, the ALTER TABLE ADD COLUMN command is direct, but speed comes from context. Engine, version, index design, and table size dictate the true cost. MySQL and PostgreSQL handle new columns differently. In PostgreSQL, adding a nullable column without a default is near-instant, even on large datasets. MySQL may copy the table depending on the storage engine. Understand these details before you run the change.
If you must set a default value, test it. Some platforms rewrite every row. Others use metadata-only operations. For large systems, this difference is hours versus milliseconds. Schema migration tools like Liquibase, Flyway, or native Rails migrations give you control, but you still own the performance profile.