Skip to content
Opensource internals
  • Posts

Clickhouse

ClickHouse Rewrites a Distributed Query for Every Shard: Pruned IN Sets and Broadcast Temporary Tables

Oct 17, 2026 14 min read Jay Hubbert

ClickHouse rewrites the query tree per shard: pruning by sharding key and shipping temporary tables for GLOBAL IN/JOIN.

ClickhouseDistributedInternalsQuery planning

Read more →

ClickHouse Replicates MergeTree: A ZooKeeper Log Where One Round Trip Does Dedup and Block Number

Oct 17, 2026 16 min read Jay Hubbert

Replication is a ZooKeeper log plus a content-hash deduplication check that rides along with the block-number allocation.

ClickhouseReplicationInternalsZookeeperDistributed

Read more →

ClickHouse's Native Protocol Is a Half-Duplex State Machine: Progress and Logs Piggyback on Results

Oct 17, 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 Cuts CSV at Row Boundaries: A Quote-Aware Scanner and a Ticket-Numbered Ring

Oct 17, 2026 17 min read Jay Hubbert

ClickHouse splits CSV into row-aligned chunks with a quote-aware scanner, parses them on separate threads, and reorders them with a ticket ring.

ClickhouseInternalsCsvParallelismPerformance

Read more →

ClickHouse's Native Format Writes Columns, Not Rows: Bulk Serialisers and a One-Byte Kind Stack

Oct 17, 2026 14 min read Jay Hubbert

The Native format writes a row count, then for each column its name, type, serialization kind and bulk data — never a row.

ClickhouseInternalsFormatsSerializationPerformance

Read more →

← Newer Page 16 of 21 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·