MergeTree Engine Family
Table engines from the MergeTree family are the core of ClickHouse data storage capabilities. They provide most features for resilience and high-performance data retrieval: columnar storage, custom partitioning, sparse primary index, secondary data-skipping indexes, etc.
Base MergeTree table engine can be considered the default table engine for single-node ClickHouse instances because it is versatile and practical for a wide range of use cases.
For production usage ReplicatedMergeTree is the way to go, because it adds high-availability to all features of regular MergeTree engine. A bonus is automatic data deduplication on data ingestion, so the software can safely retry if there was some network issue during insert.
All other engines of MergeTree family add extra functionality for some specific use cases. Usually, it's implemented as additional data manipulation in background.
The main downside of MergeTree engines is that they are rather heavy-weight. So the typical pattern is to have not so many of them. If you need many small tables, for example for temporary data, consider Log engine family.
Page | Description |
---|---|
AggregatingMergeTree | Replaces all rows with the same primary key (or more accurately, with the same sorting key) with a single row (within a single data part) that stores a combination of states of aggregate functions. |
Approximate Nearest Neighbor Search with Vector Similarity Indexes | Approximate Nearest Neighbor Search with Vector Similarity Indexes |
CollapsingMergeTree | Inherits from MergeTree but adds logic for collapsing rows during the merge process. |
Custom Partitioning Key | Learn how to add a custom partitioning key to MergeTree tables. |
GraphiteMergeTree | Designed for thinning and aggregating/averaging (rollup) Graphite data. |
Full-text Search using Full-text Indexes | Quickly find search terms in text. |
MergeTree | MergeTree -family table engines are designed for high data ingest rates and huge data volumes. |
ReplacingMergeTree | differs from MergeTree in that it removes duplicate entries with the same sorting key value (ORDER BY table section, not PRIMARY KEY ). |
Data Replication | Overview of Data Replication in ClickHouse |
SummingMergeTree | SummingMergeTree inherits from the MergeTree engine. Its key feature is the ability to automatically sum numeric data during part merges. |
VersionedCollapsingMergeTree | Allows for quick writing of object states that are continually changing, and deleting old object states in the background. |