ClickHouse's SLRU Cache Promotes an Entry on Its Second Touch: A Scan Can't Flush It
ClickHouse’s default cache policy is SLRU, not LRU: entries hit twice are promoted to a protected queue that a sequential scan cannot flush.
All posts published on this site.
Everything published here, newest first.
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 defers heavy and/or/if arguments into a thunk and runs them only on the rows a UInt8 mask leaves undecided.
ClickHouse inlines aliases, runs 47 ordered tree passes, prunes columns and rewrites count(*) into a metadata read before planning.
ClickHouse compiles a SELECT into an ActionsDAG and reuses the sorted plan for every block.
ClickHouse matches ORDER BY against the sorting key and reads MergeTree parts in key order instead of sorting everything.