Adding a new column is simple in syntax and complex in impact. One line of SQL can alter storage, indexes, and application logic. In SQL Server, PostgreSQL, or MySQL, the command is clear:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
But every system reacts differently. On some engines, adding a large column can lock the table. On others, it streams in place. In production, that difference means seconds or hours of downtime.
A new column changes performance. If it is nullable with no default, the addition may be instant. Add a non-null column with a default and the database may rewrite every row. The more rows in the table, the longer the operation.
Plan migrations in stages. First, add the new column as nullable. Then backfill it in small batches. Last, add constraints and defaults. This avoids locking and keeps services available.