The bottleneck lived in the table. A new column could fix it, or ruin the schema for months.
When adding a new column, speed and safety matter more than theory. Migrations that lock tables can crush performance. On large datasets, a simple ALTER TABLE command can freeze reads and writes. Always check how your database engine handles new column creation.
In PostgreSQL, adding a new nullable column with no default is fast. Adding one with a default writes to every row, which can be expensive. In MySQL, the cost depends on storage engine and version. Some support instant column addition, others do a full table rebuild.
Before creating a new column, decide its type and constraints. Wrong choices lead to later rewrites, each slower and riskier than the first. Ensure the default value strategy is tested in a staging environment. Use feature flags to roll out application code that depends on the change. Never deploy schema and code changes in the wrong order.