A new column changes your data model. It shifts how queries run, how indexes work, and how downstream systems process results. In SQL, the syntax is direct:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
This command runs fast on small tables. On large datasets, it can block writes or lock rows for a long time. Engineers must weigh the cost of downtime, replication lag, and migration rollback.
Best practice is to add the column as nullable, backfill in batches, and update application code in phases. Avoid non-null with default values on massive tables—this can trigger a full table rewrite. In PostgreSQL, adding a nullable column is instant because it only updates system catalogs. MySQL may behave differently, depending on storage engine and version.
After the schema change, ensure your ORM or query builders are aware of the new column. Audit existing indexes. If the column will be queried often, add an index only after the backfill to avoid re-indexing costs.