Add a Column to 300 Million Rows Without Downtime #coding #softwarearchitect #programming — Transcript
Full transcript
- 0:00Your users table has 300 million rows
- 0:03and traffic never stops. Now you must
- 0:05add a column.
- 0:07How do you do it without taking the site
- 0:09down?
- 0:12The wrong way is one giant update. It
- 0:14holds locks for hours and every query
- 0:16behind it waits.
- 0:20Stage one, add the column as nullable
- 0:22with no default. The database only edits
- 0:25its notes about the table, so it
- 0:26finishes instantly.
- 0:30Stage two, ship the app so every new
- 0:32write fills the column and reads fall
- 0:34back to a default when it is empty.
- 0:39Stage three, backfill the old rows in
- 0:41small batches,
- 0:42a few thousand at a time. Pause, check
- 0:44the load, repeat. The database never
- 0:46notices.
- 0:49When no empty rows remain, add the
- 0:51constraint and delete the fallback code.
- 0:54Three safe stages, zero downtime.
- 0:58Follow for more system design in under a
- 1:01minute.
About this transcript
This page contains the full transcript of Add a Column to 300 Million Rows Without Downtime #coding #softwarearchitect #programming by Scale in 60 sec, generated from the public captions YouTube serves with the video. The transcript has 142 words across 25 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.