Skip to content
Opensource internals
  • Posts

Posts

All posts published on this site.

Everything published here, newest first.

ClickHouse Skips Data: Granules, Marks, and Bit-Packed Indexes

Oct 21, 2026 23 min read Jay Hubbert

A MergeTree scan isn’t a full scan. Parts are cut into granules, each granule gets a bit-packed mark, and the primary key index stores one key value per granule — so…

ClickhousePerformanceInternalsMerge treeStorage engineIndexes

Read more →

ClickHouse Sorts in Parallel: Partial Sort, Merge Sorted Streams and External Sort

Oct 21, 2026 17 min read Jay Hubbert

ClickHouse never sorts the whole dataset at once. It sorts each chunk, throws away rows that can’t make the top-N, merges the sorted streams, and spills runs to disk when…

ClickhouseInternalsSortingPerformance

Read more →

ClickHouse Splits GROUP BY into 256 Buckets for Parallel Merges

Oct 21, 2026 15 min read Jay Hubbert

A GROUP BY needs a serial merge at the end — and that’s where the memory high-water mark lives.

ClickhouseInternalsHash tableAggregationParallelism

Read more →

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

Oct 21, 2026 26 min read Jay Hubbert

LowCardinality(T) stores a dictionary of distinct values once and keeps a 1–8 byte index per row.

ClickhousePerformanceInternalsMemoryCompression

Read more →

ClickHouse's Query Condition Cache: Skip Granules You Don't Need to Read

Oct 21, 2026 13 min read Jay Hubbert

ClickHouse caches the granules a predicate emptied, so a dashboard that runs the same query every 30 seconds stops paying for index analysis and skipped data.

ClickhousePerformanceInternalsMerge treeStorage engineCaching

Read more →

← Newer Page 3 of 25 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·