Skip to content
Opensource internals
  • Posts

Posts

All posts published on this site.

Everything published here, newest first.

ClickHouse Recycles Small Objects Through Per-Size Free Lists

Oct 23, 2026 18 min read Jay Hubbert

ClickHouse’s ArenaWithFreeLists keeps one free list per power-of-two size class and threads the free-list link through the freed block itself.

ClickhouseInternalsMemoryPerformanceData structures

Read more →

ClickHouse Rewrites the Query Before It Plans It

Oct 23, 2026 19 min read Jay Hubbert

ClickHouse inlines aliases, runs 47 ordered tree passes, prunes columns and rewrites count(*) into a metadata read before planning.

ClickhouseInternalsQuery planOptimization

Read more →

ClickHouse Runs Distributed DDL Through a ZooKeeper Task Queue

Oct 23, 2026 16 min read Jay Hubbert

Distributed DDL is a ZooKeeper queue of sequential entries plus a per-host finished directory that the initiator lists to collect results.

ClickhouseDistributedZookeeperDdlInternals

Read more →

ClickHouse Short-Circuits AND and OR with a Mask and a Deferred Column

Oct 23, 2026 21 min read Jay Hubbert

ClickHouse defers heavy and/or/if arguments into a thunk and runs them only on the rows a UInt8 mask leaves undecided.

ClickhouseInternalsPerformanceShort circuit

Read more →

ClickHouse's LRU Cache Keeps Its Order in a Linked List

Oct 23, 2026 20 min read Jay Hubbert

ClickHouse’s LRU cache is a hash map of cells pointing into a linked list, so a lookup is an O(1) splice and eviction is a pop from the front.

ClickhouseInternalsCachingPerformanceData structures

Read more →

← Newer Page 9 of 41 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·