A new column alters the schema. Whether in PostgreSQL, MySQL, or a cloud-native data store, the primary concern is how to apply the change with minimal impact. Adding a nullable column is fast. Adding a non-null column with a default can lock writes. Large tables magnify this cost. The solution is to add the column as nullable, backfill in controlled batches, and then set constraints. This avoids blocking operations.
When introducing a new column, confirm its data type. Use the smallest efficient type. An integer may be smaller than a string, and a timestamp without time zone may be leaner than one with zone data. Smaller types mean less storage and faster scans.
Indexing a new column requires care. An index speeds lookups but adds overhead to writes. Build indexes after the backfill, not before. Selective indexing improves query performance without harming insert throughput. Partial indexes and covering indexes give further control.