PostgreSQL's json and jsonb Implementation in C: Text Versus Tree
json keeps your exact bytes; jsonb re-serializes into a tree of 4-byte JEntry headers whose 28-bit field holds either a length or an offset.
All posts published on this site.
Everything published here, newest first.
json keeps your exact bytes; jsonb re-serializes into a tree of 4-byte JEntry headers whose 28-bit field holds either a length or an offset.
TupleDesc now caches the byte offset of every fixed-width attribute, so fetching column 40 of a wide table can cost one addition instead of a full re-walk.
tmux formats are code, and they execute where they’re expanded.
A date is an int32 count of days since 2000-01-01 — which is why ordering is free, why ‘infinity’ is literally INT32_MAX, and why the calendar costs you nothing at query time.
PostgreSQL’s sorter attacks three problems at once: abbreviated keys make string comparisons into integer compares, a radix sort handles integer keys, and a bounded heap makes …