ClickHouse Recycles Small Objects Through Per-Size Free Lists
ClickHouse’s ArenaWithFreeLists keeps one free list per power-of-two size class and threads the free-list link through the freed block itself.
ClickHouse’s ArenaWithFreeLists keeps one free list per power-of-two size class and threads the free-list link through the freed block itself.
ClickHouse inlines aliases, runs 47 ordered tree passes, prunes columns and rewrites count(*) into a metadata read before planning.
Distributed DDL is a ZooKeeper queue of sequential entries plus a per-host finished directory that the initiator lists to collect results.
ClickHouse defers heavy and/or/if arguments into a thunk and runs them only on the rows a UInt8 mask leaves undecided.
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.