The database was slowing down, and the schema had nowhere left to grow. You needed a new column.
Adding a new column seems simple, but in production, it can decide whether your deployment takes seconds or hours. The wrong move locks tables, blocks writes, and sends alerts. The right move keeps traffic live, lets queries flow, and ships changes without a blip.
A new column in SQL is a schema change that alters how rows are stored and retrieved. Whether it’s PostgreSQL, MySQL, or a distributed store, adding one changes the internal structure of the table. On large datasets, this can trigger full table rewrites. That’s the risk.
Best practice starts with knowing your database engine. In PostgreSQL, ALTER TABLE ... ADD COLUMN is typically fast if given a default of NULL. In MySQL, adding even a nullable column can still rewrite the table unless you use ALGORITHM=INPLACE or an online migration tool.
Indexes add another layer. You rarely want to index a new column on creation if the table is large—build the index separately and asynchronously. This avoids locking and keeps your migration under control.