A new column is more than a place to store data. It is a structural change to your schema. Done right, it improves queries, adds fresh capabilities, and keeps your database ready for growth. Done wrong, it slows everything down.
When you add a new column in SQL, you are altering the schema of an existing table. The most direct method is:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
This works across SQL databases such as PostgreSQL, MySQL, and MariaDB. But the details matter. On large datasets, adding a column with a default value can lock the table and block writes. Consider adding it without a default, then backfilling in batches.
For PostgreSQL:
ALTER TABLE events ADD COLUMN archived BOOLEAN;
UPDATE events SET archived = false WHERE archived IS NULL;
ALTER TABLE events ALTER COLUMN archived SET DEFAULT false;
For MySQL, beware of instant or in-place algorithms. These can reduce downtime, but you must check your storage engine and version.