The query ran fast. The database stalled. You knew what was missing: a new column.
Adding a new column is not just schema decoration. It changes how data lives, moves, and gets read. Done right, it can improve query performance, support new features, and prevent fragile workarounds. Done wrong, it can lock tables, block writes, and cause cascading failures.
Start with the definition. In SQL, a new column is an addition to an existing table. You set its name, type, constraints, and defaults. You think about nullability. You think about storage.
Plan before you alter. Audit your table. Check index usage. Measure the size in rows and bytes. Identify downstream services that read from this table. Every column is a contract — once it ships, removing or changing it will break something.
Choose the data type carefully. Avoid oversized types. Use integers for counters, timestamps for datetime data, and enums or small strings for predictable sets. Align types to match existing schema conventions. Consistency matters for maintainability and performance.