Adding a new column sounds simple. In production, it’s not. Schema changes touch storage, memory, indexes, queries, and APIs. A careless migration can lock tables, burn CPU, and block deploys.
First, choose the column type with precision. Match it to the smallest type that works. Avoid overusing TEXT or BIGINT when smaller primitives will do. Smaller types mean faster scans, cheaper indexes, and less I/O.
Second, decide how to populate it. If it needs a default value, weigh the cost of backfilling in one transaction versus a batched, online migration. For large datasets, use backfill scripts that run in chunks and avoid long locks.
Third, update your indexes. Adding a new column may require composite indexes or dropping redundant ones. Run EXPLAIN before and after to verify the query plan.