~/talk

Dealing with Very Large Tables in SQL Server

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

Practical runbook for tables >1TB with concrete numbers and fixes: an unindexed filter on 20 billion rows, 4.6 TB, 28 minutes, 72M logical reads shows why early indexing matters; use online/resumable builds or filtered indexes if you can. Statistics sampling causes massive overestimates (examples: 100M rows → 44x, specific query 245 vs 32,000 → ~130x); fix with higher sample rates, persist_sample_percent and NORECOMPUTE, or manual filtered stats and async auto‑update. Also demos include profiler checks, columnstore quirks, range‑seek workarounds and ALTER TABLE SWITCH to remove identity without full copy.

AI-written summary · about

  1. 0:00Large tables in SQL Server
  2. 1:09Defining very large tables
  3. 3:57Challenges with large tables
  4. 7:28Missing indexes cost
  5. 9:57Query writing impact
  6. 14:10Cardinality estimation issues
  7. 24:33Fixing cardinality issues
  8. 28:44Auto update stats async
  9. 35:38Auto create stats risks
  10. 39:13Querying log tables
  11. 42:31Ascending key problem
  12. 46:18Identity column changes
  13. 50:33Q&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.