NoSQL Best Practices for PostgreSQL
summary
Compares Postgres jsonb vs Mongo/BSON with 1M rows benchmark on AWS (Postgres 9.6, Mongo 3.4, custom fork of rnb-mark); shows jsonb throughput matches document DBs in many read workloads and falls behind only in specific configs. Finds a performance peak at 20 concurrent clients on small instances, spinlock contention 4x increase under high concurrency for Mongo leading to degradation, and a TOAST threshold where storage/reads worsen — TOAST kicks in at ~2KB. Recommends indexing paths, tuning checkpoints for writes, using jsonb_each/populate_record or pulling hot fields into columns.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 3:14Benchmark context and goals
- 10:38Read document benchmarks
- 17:15JSON storage in PostgreSQL
- 27:10Reading complex documents
- 30:39Insert/update benchmarks
- 33:25Indexing and update issues
- 38:45Fetching document parts
- 41:35Complex query solutions
- 44:24Documents vs tables
- 47:33Summary and recommendations
- 48:59Q&A
related talks
53mPostgres vs Mongo
48mPostgres and Json - How to get the best of them?
48mThe NoSQL Way in PostgreSQL
42mNoSQL as Not Only SQL
49mShould I use JSON in PostgreSQL?
05mPostgreSQL JSON JSONB Making the Right Choice for Your Application
35mLeveraging PostgreSQL 17's JSONB for Enhanced Data Modeling
14mJSON data structure – the hidden gem inside your database engine
