Skip to content
Opensource internals
  • Posts

Internals

ClickHouse's Hash Join Stores the Right Table as 64-bit Row Words

Oct 22, 2026 19 min read Jay Hubbert

The ClickHouse hash join keeps the right table as blocks and stores one tagged 64-bit row word per hash-table cell.

ClickhousePerformanceInternalsJoinsHash tables

Read more →

ClickHouse's Merge Join Walks Two Sorted Streams and Skips Whole Runs

Oct 22, 2026 19 min read Jay Hubbert

ClickHouse’s merge join advances two sorted cursors in lockstep and uses a fused compare-and-run-search to skip whole equal-key runs.

ClickhousePerformanceInternalsJoinsMerge join

Read more →

ClickHouse's Native Protocol Is a Half-Duplex State Machine

Oct 22, 2026 20 min read Jay Hubbert

ClickHouse’s TCP handler interleaves sending results with reading the next command on a timer, piggybacking logs and progress onto the output stream.

ClickhouseInternalsNetworkingProtocolConcurrency

Read more →

ClickHouse's Thread Pool Wakes the Newest Idle Thread and Counts Events Per CPU

Oct 22, 2026 19 min read Jay Hubbert

ClickHouse’s thread pool wakes the most recently idle thread, and its counters are sharded per CPU so that counting never costs a cache-line ping-pong.

ClickhouseConcurrencyInternalsPerformanceThread pool

Read more →

ClickHouse's Token-Bucket Throttler Sleeps Without Burning a CPU Slot

Oct 22, 2026 16 min read Jay Hubbert

ClickHouse’s throttler is a token bucket that sleeps for the token deficit and parks the caller’s CPU lease so the wait need not consume concurrency budget.

ClickhouseInternalsPerformanceIoThrottling

Read more →

← Newer Page 14 of 41 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·