The query was slow, and the deadline was closer than expected. You needed to add a new column.
A new column changes the shape of your database. It affects every query, index, and piece of code that touches that table. In production, a careless schema update can lock writes, block reads, or cause downtime. That is why adding a new column must be deliberate, measured, and tested.
First, know the type. Choose the smallest data type that covers the expected range. Avoid NULL unless it is required. Set a default when possible to prevent inconsistencies.
Second, plan the migration. For large tables, adding a new column in one blocking step can cause outages. Use an online schema change tool or a phased migration. If your database supports it, add the column with a default value that avoids rewriting every row.
Third, update the code. Expose the new column in your data models. Ensure the application can handle both old and new states during rollout. Deploy database and application changes in separate stages to reduce risk.