~/talk

What the heck is a checkpoint, and why should I care?

Talkat SQLBits 2022 · 2022-03-08..03-12· [databases]
slides:none on file

Explains exactly what a SQL Server checkpoint does: writes dirty pages after flushing log records so crash recovery can redo/undo from the LSN/boot page marker, and how that affects IO and recovery time. Demos use SQL Query Stress and traceflags (3605, 3502, 3504) to show checkpoints beginning/ending and per-checkpoint dirty-page counts. Notes chunk size change from 256 KB pre-2016 to 1 MB in 2016+, differences between automatic, indirect (default since 2016) and manual checkpoints, and practical tuning (example: changing indirect target from 60s to 15s) to smooth IO spikes.

AI-written summary · about

  1. 0:00Start
  2. 12:57Write Ahead
  3. 36:53Automatic "Recovery Interval" default zero • What does this value mean? How reliable is this setting? • When do you change default? Changing to over 60 min require "OVERRIDE"
  4. 38:26Manual Transact-SQL CHECKPOINT 'checkpoint_duration' seconds to complete • Not guaranteed • Advanced option When do you use a Manual Checkpoint? When do you use 'checkpoint duration'?
  5. 42:21Checkpoint tempdb
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.