Skip to content
Opensource internals
  • Posts

Posts

All posts published on this site.

Everything published here, newest first.

ClickHouse Marks Empty Hash Table Cells With Zeroed Memory

Oct 21, 2026 24 min read Jay Hubbert

ClickHouse’s hash table has no occupancy bit, no tombstone, and no sentinel pointer.

ClickhouseInternalsHash tablePerformanceMemory

Read more →

ClickHouse Merges Columns One at a Time: The Vertical Merge Algorithm

Oct 21, 2026 20 min read Jay Hubbert

ClickHouse’s vertical merge splits a merge into two stages: merge the key and record where each output row came from (one byte per row), then gather each payload column…

ClickhousePerformanceInternalsMerge treeStorage engine

Read more →

ClickHouse Packs Short Strings Into Hash Table Keys: No Allocation Per Key

Oct 21, 2026 14 min read Jay Hubbert

ClickHouse never stores a std::string in a hash table cell. It splits keys into size classes and packs strings of up to 24 bytes into plain integers, so your GROUP BY…

ClickhouseInternalsHash tableStringsPerformance

Read more →

ClickHouse Plans Distributed Queries with Cascades: A Real Cost-Based Optimizer

Oct 21, 2026 22 min read Jay Hubbert

ClickHouse’s new Cascades optimizer treats a distributed query as a search problem.

ClickhousePerformanceInternalsQuery planningDistributed

Read more →

ClickHouse Runs a Query Pipeline on N Threads: Task Queues, Work Stealing and a Pool That Grows on Demand

Oct 21, 2026 21 min read Jay Hubbert

ClickHouse doesn’t hand you max_threads threads. It starts with one, measures how much parallel work the pipeline actually creates, and grows the pool only when idle…

ClickhouseInternalsQuery executionConcurrency

Read more →

← Newer Page 2 of 25 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·