ClickHouse Skips Data: Granules, Marks, and Bit-Packed Indexes
A MergeTree scan isn’t a full scan. Parts are cut into granules, each granule gets a bit-packed mark, and the primary key index stores one key value per granule — so…
A MergeTree scan isn’t a full scan. Parts are cut into granules, each granule gets a bit-packed mark, and the primary key index stores one key value per granule — so…
ClickHouse never sorts the whole dataset at once. It sorts each chunk, throws away rows that can’t make the top-N, merges the sorted streams, and spills runs to disk when…
A GROUP BY needs a serial merge at the end — and that’s where the memory high-water mark lives.
LowCardinality(T) stores a dictionary of distinct values once and keeps a 1–8 byte index per row.
ClickHouse caches the granules a predicate emptied, so a dashboard that runs the same query every 30 seconds stops paying for index analysis and skipped data.