Research
Chris van Eijk: json vs jsonb in PostgreSQL: size and speed, measured
The Brief
- Chris van Eijk measures json and jsonb in PostgreSQL 17 and 18 across six document shapes.
- Reported size differences range from jsonb 23% smaller to jsonb 41% larger, depending on the document shape.
- The article also covers read speed and GIN indexing.
Why it matters
Choosing json or jsonb affects storage size, read performance and indexing, so measured trade-offs help developers pick the right column type for their documents.
Who’s affected
- PostgreSQL developers choosing a column type for JSON data
- PostgreSQL 17
- PostgreSQL 18
- #postgresql
- #json
- #jsonb
- #performance
- #benchmark
json vs jsonb in PostgreSQL 17 and 18, measured on six document shapes: when jsonb is 23% smaller or 41% larger, read speed, GIN, and what it changes.