~/talk

Optimal Data Loads

Talkat PGConf NYC 2022 · 2022-09-22..09-23· [databases, data-engineering]
name:Ben Lis
links:none on file
slides:none on file

A 295 MB CSV of ~2 million rows and 10 fields loads row-by-row in ~9:15 locally and ~7:11 over the network, but switching to COPY/backslash COPY via psycopg drops local runs to ~51s and server runs to ~21s, a roughly 10x improvement; further tactics include using a staging table (all-text columns to avoid parse errors), dropping/recreating indexes for slightly faster loads, and using unlogged tables to shave time at the cost of WAL safety. Scripts and slides live in the GitHub repo.

AI-written summary · about

  1. 0:00Introduction to optimal data loads
  2. 10:45Defining data loads and ETL vs ELT
  3. 23:55Don’s slow Python data load problem
  4. 31:17Using COPY command for fast data loading
  5. 40:15Advanced optimizations: indices and UNLOGGED tables
  6. 43:05Key takeaways and Q&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.