The database was slowing down, and the fix was simple: add a new column.
When you create a new column in a production table, you’re not just adding data storage. You’re changing the schema, the queries, and sometimes the logic across the entire stack. The operation can be instant or it can lock your table for hours, depending on size, engine, and migration strategy.
A new column affects read queries, write queries, indexes, and sometimes cache layers. In relational databases like PostgreSQL or MySQL, adding a new column with a default value can rewrite the whole table. Without a default, the database may just update metadata. In NoSQL platforms, schema changes are usually more flexible, but you still need to handle backfill logic in application code.
Production-safe schema changes start with visibility. Always measure table size, query patterns, and available downtime. Use online schema change tools like gh-ost or pt-online-schema-change for MySQL, or pg_repack for PostgreSQL. Test migrations in a staging environment and confirm the execution plan before you touch live data.