Unlock this content

Enter your email to unlock this content for free

By continuing, you agree to our Terms of Service and Privacy Notice, and to receive occasional marketing emails.

Parts, Partitions, Merges, and Indexes

TL;DR

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:

Tinybird is not affiliated with, associated with, or sponsored by ClickHouse, Inc. ClickHouse® is a registered trademark of ClickHouse, Inc.

Parts, Partitions, Merges, and Indexes | ClickHouse for Developers