~/talk

Implementing Slowly Changing Dimensions in Postgres

slides:none on file

Reviews six SCD patterns and argues type six is the most practical, then shows a working Postgres design that stores validity as a daterange, uses the btree_gist extension for a uniqueness constraint that prevents overlapping ranges, and keeps complex attributes in JSONB. Demonstrates window functions to detect gaps, partitioning by end date for archiving, and options for the current flag (sentinel infinity, partial index, or timestamp-in-range). Shows the approach reduces application code and performs well.

AI-written summary · about

  1. 0:00Introduction
  2. 1:53Slowly changing dimensions overview
  3. 6:54Type six SCD in Postgres
  4. 13:53Postgres features for SCD
  5. 21:07Q&A
~/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.