~/talk

Postgres Performance: From Slow to Pro

Talkat DjangoCon US 2023 · 2023-10-16..10-20· [databases]
slides:none on file

Postgres tuning focuses on concrete changes: set shared_buffers to about 25% of RAM and aim for a cache-hit ratio in the high 90s, raise work_mem from the tiny default to ~16–20MB on an 8GB box, and keep max_connections aligned with capacity (default 100). Turn on pg_stat_statements, log temp files and long statements, use PG Bouncer when connections climb, add B-tree or BRIN indexes (example: index reduced a query from ~30ms to ~3ms), and watch table bloat >50%.

AI-written summary · about

  1. 0:00Postgres performance intro
  2. 3:54Machine vs app tuning
  3. 7:08Shared buffers config
  4. 10:17Working memory & temp files
  5. 12:04CPU monitoring & timeouts
  6. 14:33Table bloat explained
  7. 16:39Version upgrades matter
  8. 17:42Efficient connections
  9. 21:17Finding app performance issues
  10. 24:49Logging & monitoring tools
  11. 28:03PG stat statements
  12. 30:08Query explain plans
  13. 34:01Indexing queries
  14. 38:47Data modeling best practices
  15. 40:10N+1 query fixes
  16. 42:19Final Postgres tips
~/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.