PostgreSQL worst practices
summary
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
chapters (33)
- 0:00Introduction
- 1:54No indexes
- 2:56COUNT in high load
- 4:02Code-platform independence
- 5:25JOINs in app
- 7:29JSON over schema
- 8:12Universal data schema
- 10:00Redundant indexes
- 11:04No backups
- 13:11Custom backups
- 14:15Disable VACUUM
- 15:18Unarchived old data
- 17:02Reinvent Slony
- 18:28Master-master replication
- 20:35Synchronous replication
- 21:39Foreign keys
- 22:40App-side integrity
- 23:41Text fields vs data types
- 25:08PostgreSQL customization
- 26:31Long transactions
- 27:55Unreadable SQL
- 29:25Outdated query tuning
- 30:51Custom message queues
- 31:57ORM ban
- 33:20Using exceptions
- 35:08No connection checks
- 36:52Connection pooling
- 38:15PostgreSQL tuning
- 39:43Testing in production
- 41:09Graphical monitoring
- 41:51Loading data into PostgreSQL
- 42:33Using COPY
- 43:14Q&A
related talks
36mPostgreSQL worst practices
01h 00mThe 10 Deadly PostgreSQL Sins
50mPostgreSQL gotchas for app developers
35mThe PostgreSQL Twin Bill: The 7 Deadly PostgreSQL Mistakes & Review of What's New in PostgreSQL 14
51mHow Postgres is misused and abused in the wild
42mPostgreSQL Tips & Tricks For App Devs
11mThe Seven Principles for Making a PostgreSQL DB Work Fast
46mPostgres Platform "Best Practices" for the Modern DBA
