ClickHouse Aggregates In Order and Stops Reading Early
If your table is sorted by the GROUP BY key, ClickHouse can skip the hash table entirely: it counts each contiguous run of equal keys and emits it.
If your table is sorted by the GROUP BY key, ClickHouse can skip the hash table entirely: it counts each contiguous run of equal keys and emits it.
ClickHouse picks merge candidates with a tiny, explicit cost model: score each contiguous range as sum_size / (count - 1.9), pick the cheapest admissible one, and only ever…
uniq() is a hash table that deliberately throws data away. When it fills up, it halves its sample rate, keeps the survivors, and multiplies the count back up by the…
IN is not a comparison, it is a hash set. ClickHouse picks one of thirteen specialisations based on the shape of the right-hand side, packs integer keys into the hash…
ClickHouse compiles hot scalar expressions to native code with LLVM.