~/talk

Lessons learned from refactoring multi terabyte databases for the last 10 years

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

Ten years of refactoring multi‑terabyte databases yields concrete rules and examples: use IDEs (Visual Studio, DataGrip finds dynamic SQL references), keep tests for every external interface, deploy with ordered versioned scripts, and prefer small incremental schema changes. Real cases: tens–hundreds TB systems, a 3 TB DB with 600–800 GB tables and only 400 GB free, rebuilds needing ~600 GB, a one‑time migration that ran three days and finished two hours before reopen. Techniques: partitioning, fill factor ~80–90%, page_log hint removes ghost records, parallel runs and event logs (Kafka) for replay, moving 35% of columns can buy ~50% more cache, and dropping one little‑used index saved ~40% of DB size.

AI-written summary · about

  1. 0:00Intro
  2. 2:26Development Tools
  3. 3:39SQL Server Features Which Helps Refactoring
  4. 6:07User Access Documentation
  5. 6:57Document Interfaces Through Tests
  6. 8:51Step-By-Step Examples
  7. 11:37Deploy Scripts Versioning
  8. 12:41Benefits of Deploy Scripts
  9. 14:08Sandboxes
  10. 17:09An Event Log Before Database
  11. 23:23Internal Fragmentation
  12. 27:44Data Migration/Synchronization Techniques
  13. 33:21Parallel Run
  14. 36:13External API Pros
  15. 39:30Constraints
  16. 40:32Split Database First
  17. 40:46Split Code First
  18. 47:04Replace One-To-Many With Associative Table
  19. 48:59Data Exchange
~/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.