ClickHouse compression
Compression is where columnar storage really earns its keep — adjacent values in a column compress extraordinarily well, and ClickHouse lets you pick per-column codecs to exploit their shape. LZ4 is the default — fast, moderate ratio, good for hot data. ZSTD gives better compression at some CPU cost, ideal for cold/archived partitions. The fun stuff is the specialised codecs: Delta (store differences between adjacent values — great for monotonic timestamps, counters, IDs), DoubleDelta (differences of differences — even better for regular-interval time series), Gorilla (bit-packed delta encoding for floats — used by Facebook's Gorilla TSDB), LowCardinality (dictionary-encoded for columns with few unique values like status enums, country codes). You compose them: CODEC(Delta, LZ4) first deltas then compresses. Production tables routinely hit 10-30x compression, sometimes 100x. Always measure with system.parts — data_compressed_bytes vs data_uncompressed_bytes — because picking codecs by guesswork leaves a lot on the table.