A single command changes everything: ALTER TABLE ADD COLUMN. One moment a schema is fixed, the next it’s evolving. Adding a new column is one of the most common database operations, but it’s also one where speed, safety, and precision matter.
When you add a column, you’re changing the shape of your data. Whether you’re in PostgreSQL, MySQL, or SQLite, the database must update metadata, possibly backfill defaults, and ensure constraints are valid. On large production tables, these steps can lock writes, block reads, or trigger heavy I/O. That’s why understanding the mechanics behind a new column is critical.
In PostgreSQL, ALTER TABLE my_table ADD COLUMN new_column TEXT DEFAULT '' NOT NULL will add the column instantly for newer versions if the default is constant. But in older versions, or with a computed default, the operation can rewrite the whole table. Adding an index right after defining a new column can cascade into long lock times unless you use CREATE INDEX CONCURRENTLY.
MySQL behaves differently. A new column addition may copy the table unless you use ALGORITHM=INPLACE or INSTANT features available in recent releases. Always check information_schema.PROCESSLIST or run EXPLAIN on your DDL to understand the impact before running in production.