Skip to content
Opensource internals
  • Posts

Memory

How ClickHouse Marks Empty Hash Table Cells With Zeroed Memory

Oct 21, 2026 23 min read Jay Hubbert

Every GROUP BY in ClickHouse is a hash table. The table has to hold millions of keys, be probed once per input row, and be resized while it is being filled — all while the query is …

ClickhouseInternalsHash tablePerformanceMemory

Read more →

How ClickHouse's LowCardinality Column Shares One Dictionary Across Millions of Rows

Oct 21, 2026 25 min read Jay Hubbert

Every column-oriented database eventually meets the same data: a column of country codes, of status strings, of user agents, of enum-like labels. There are a hundred thousand rows …

ClickhousePerformanceInternalsMemoryCompression

Read more →

How ClickHouse's Variant Column Uses a Discriminator Byte and a Shared Fallback

Oct 21, 2026 18 min read Jay Hubbert

A Variant column is a tagged union: each row holds a value of one of several types, and the column itself knows the full list of alternatives. Dynamic is the same idea with an …

ClickhousePerformanceInternalsMemoryTypes

Read more →

How PostgreSQL Allocates Memory Fast

Sep 19, 2026 40 min read Jay Hubbert

Every C program that wants to be fast needs to be fast at allocating memory. PostgreSQL allocates memory in the tightest loop imaginable: a hash join probes its hash table once per …

PostgresPerformanceMemoryInternals

Read more →

How tmux Stores Grid Cells in Five Bytes

Jul 22, 2026 8 min read Jay Hubbert

A terminal grid cell is not small. In the “in-memory” representation it holds a UTF-8 character (up to four bytes), a foreground colour, a background colour, an underline colour, a …

TmuxPerformanceInternalsMemory

Read more →

← Newer Page 1 of 2 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·