Adding a new column changes the shape of your data model. It affects queries, indexes, storage, and performance. In relational databases, this means altering the table schema. In SQL, the standard command is:
ALTER TABLE table_name
ADD COLUMN column_name data_type;
On large datasets, this can lock the table and cause downtime. Many engineers use online schema change tools to add a new column without blocking writes. MySQL’s pt-online-schema-change or PostgreSQL’s ADD COLUMN with defaults managed in code are common patterns.
If the new column needs indexing, evaluate the query patterns first. Adding an index immediately after the column may speed up filters and joins but can slow down writes. For nullable columns, set NULL as the default to avoid rewriting the whole table. If the column is non-nullable, first create it as nullable, backfill data in batches, then apply the NOT NULL constraint.