ClickHouse's LowCardinality Column Shares One Dictionary Across Millions of Rows
LowCardinality(T) stores a dictionary of distinct values once and keeps a 1–8 byte index per row.
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.
ClickHouse caches query results by hashing the parsed query, not the text you typed, plus the settings and database that could change the answer.
A Variant column is a struct of arrays — one sub-column per alternative, one tag byte per row, one offset per row.
Underneath every ClickHouse data type there is exactly one data structure: a flat array of trivially-copyable elements. UInt64 is an array of UInt64. String is a flat character …