~/talk

PostgreSQL worst practices

Talkat HighLoad++ 2017 · 2017-11-07..11-08· [databases]
links:none on file
slides:none on file

A rapid-fire catalog of concrete anti-patterns for PostgreSQL with how often they appear and quick demos: testing indexes on tiny dev tables and concluding don't use indexes, obsessively running exact COUNT() per page under 500+ concurrent users, replacing JOINs with app-side merges that require custom buffering/optimizers, shoving everything into id+JSON rows, preferring replication instead of backups and skipping test restores, disabling autovacuum, inventing homemade replication/queues, and shipping Postgres in Docker without tuning.

AI-written summary · about

  1. 0:00Introduction
  2. 1:54No indexes
  3. 2:56COUNT in high load
  4. 4:02Code-platform independence
  5. 5:25JOINs in app
  6. 7:29JSON over schema
  7. 8:12Universal data schema
  8. 10:00Redundant indexes
  9. 11:04No backups
  10. 13:11Custom backups
  11. 14:15Disable VACUUM
  12. 15:18Unarchived old data
  13. 17:02Reinvent Slony
  14. 18:28Master-master replication
  15. 20:35Synchronous replication
  16. 21:39Foreign keys
  17. 22:40App-side integrity
  18. 23:41Text fields vs data types
  19. 25:08PostgreSQL customization
  20. 26:31Long transactions
  21. 27:55Unreadable SQL
  22. 29:25Outdated query tuning
  23. 30:51Custom message queues
  24. 31:57ORM ban
  25. 33:20Using exceptions
  26. 35:08No connection checks
  27. 36:52Connection pooling
  28. 38:15PostgreSQL tuning
  29. 39:43Testing in production
  30. 41:09Graphical monitoring
  31. 41:51Loading data into PostgreSQL
  32. 42:33Using COPY
  33. 43:14Q&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.