Skip to content
Opensource internals
  • Posts

Performance

PostgreSQL Hashes Lookups: Dynahash and Simplehash

Aug 19, 2026 54 min read Jay Hubbert

PostgreSQL has two hash tables: dynahash grows one bucket at a time and never rehashes, while simplehash is a templated open-addressing table that resizes without rehashing a …

PostgresPerformanceInternalsStorage

Read more →

PostgreSQL Uses SIMD to Scan Strings Faster: One Vector Layer, Six Consumers

Aug 14, 2026 45 min read Jay Hubbert

PostgreSQL’s port/simd.h is a portable SSE2/NEON vector layer, and COPY FROM, hex coding, JSON escaping, ASCII validation, linear search and radix-tree lookup all use it to skip …

PostgresPerformanceSimdInternals

Read more →

PostgreSQL Locks Tables Fast: The Fast Path and Sixteen Lock Partitions

Aug 6, 2026 36 min read Jay Hubbert

Most PostgreSQL locks never touch the heavyweight lock table: weak relation locks live in a per-backend fast path, and the real lock table is split into sixteen …

PostgresPerformanceConcurrencyInternals

Read more →

PostgreSQL Defers and Speeds Up Tuple Deformation: Cached Offsets in TupleDesc

Jul 28, 2026 36 min read Jay Hubbert

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.

PostgresPerformanceStorageInternals

Read more →

PostgreSQL Sorts Rows Fast: Abbreviated Keys, Radix Sort, and Top-N Heaps

Jul 25, 2026 45 min read Jay Hubbert

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 …

PostgresPerformanceSortInternals

Read more →

← Newer Page 21 of 23 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·