
Unlock this content
Enter your email to unlock this content for free
Parts, Partitions, Merges, and Indexes
ClickHouse stores data in immutable parts that are continuously merged in the background. Monitor part counts (100+ per partition degrades performance). Use partitions to organize data and enable fast data management, preferring time-based partitioning over complex multi-column keys. Sparse indexes help locate data quickly, but only for columns in your sorting key. Design your ORDER BY to match your query patterns.
Columnar Storage
ClickHouse is a columnar database: data is stored by columns rather than rows. When you query SELECT user_id, timestamp FROM events, ClickHouse only reads those two columns, not entire rows.
Parts
Data in ClickHouse is stored in parts - immutable chunks written to disk during inserts.
Key characteristics: