Skip to content
Opensource internals
  • Posts

Algorithms

ClickHouse Estimates topK with a Space-Saving Counter and an Error Bound

Oct 24, 2026 20 min read Jay Hubbert

ClickHouse’s topK uses Filtered Space-Saving: each candidate keeps a count and an error bound, and the least accurate counters are dropped when the table overflows.

ClickhouseAlgorithmsInternalsStreaming

Read more →

ClickHouse's SLRU Cache Gives Hot Entries a Second Queue

Oct 23, 2026 20 min read Jay Hubbert

ClickHouse’s default cache policy is SLRU, not LRU: entries hit twice are promoted to a protected queue that a sequential scan cannot flush.

ClickhouseInternalsCachingPerformanceAlgorithms

Read more →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·