ClickHouse Short-Circuits AND and OR with a Mask and a Deferred Column
ClickHouse defers heavy and/or/if arguments into a thunk and runs them only on the rows a UInt8 mask leaves undecided.
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.
ClickHouse’s default cache policy is SLRU, not LRU: entries hit twice are promoted to a protected queue that a sequential scan cannot flush.
ClickHouse hashes each async insert into a per-key buffer and flushes it on size, count, or an adaptive deadline.
ClickHouse resolves an INSERT’s columns by name into a sample block, then squashes, dedup-stamps and fans the data out to the sinks.