The query runs fast until it hits the edge of the table. You need a new column. Not tomorrow. Now.
A new column changes the shape of your data. It can store fresh state, track new events, or hold computed results. Done right, it integrates without breaking existing queries. Done wrong, it slows reads, bloats storage, and creates migration headaches.
Adding a new column should start with a clear definition. Name it for what it holds. Keep it consistent with existing schema conventions. Avoid vague strings when integers or enums will do. Every extra byte adds up.
In relational databases, creating a new column is straightforward:
ALTER TABLE orders ADD COLUMN discount_rate DECIMAL(5,2) DEFAULT 0;
That single statement updates the table instantly for small datasets. For large tables, you need to consider the lock time and replication lag. Online schema change tools can help.