Adding a new column in a database is simple in syntax but heavy in impact. It alters schema, shifts query performance, and forces every dependent service to adapt. The wrong move can slow entire systems. The right one can unlock features in production without downtime.
To add a new column, you define its type, constraints, and defaults. In SQL:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP DEFAULT NOW();
That runs fast on an empty table. On millions of rows, it can lock writes. Production-grade changes require planning. Use nullable columns first, backfill data in batches, then enforce constraints. This avoids long locks and keeps uptime high.
A new column is more than storage for more data. It changes how indexes work. It affects cache keys. It impacts replication lag. Every query using SELECT * will now pull it in. Even a boolean can increase row size beyond a page boundary, slowing IO.