mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
[Docs] Recommend ReplacingMergeTree for frequent updates
This commit is contained in:
parent
c465933b1d
commit
8062fb578c
@ -6,7 +6,7 @@ sidebar_label: MergeTree
|
|||||||
|
|
||||||
# MergeTree
|
# MergeTree
|
||||||
|
|
||||||
The `MergeTree` engine and other engines of this family (`*MergeTree`) are the most robust ClickHouse table engines.
|
The `MergeTree` engine and other engines of this family (`*MergeTree`) are the most common and most robust ClickHouse table engines.
|
||||||
|
|
||||||
Engines in the `MergeTree` family are designed for inserting a very large amount of data into a table. The data is quickly written to the table part by part, then rules are applied for merging the parts in the background. This method is much more efficient than continually rewriting the data in storage during insert.
|
Engines in the `MergeTree` family are designed for inserting a very large amount of data into a table. The data is quickly written to the table part by part, then rules are applied for merging the parts in the background. This method is much more efficient than continually rewriting the data in storage during insert.
|
||||||
|
|
||||||
@ -32,6 +32,8 @@ Main features:
|
|||||||
The [Merge](/docs/en/engines/table-engines/special/merge.md/#merge) engine does not belong to the `*MergeTree` family.
|
The [Merge](/docs/en/engines/table-engines/special/merge.md/#merge) engine does not belong to the `*MergeTree` family.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
If you need to update rows frequently, we recommend using the [`ReplacingMergeTree`](/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md). Using `ALTER TALBE my_table UPDATE` to update rows triggers a mutation, which causes parts to be re-written and uses IO/resources. With `ReplacingMergeTree`, you can simply insert the updated rows and the old rows will be replaced according to the table sorting key.
|
||||||
|
|
||||||
## Creating a Table {#table_engine-mergetree-creating-a-table}
|
## Creating a Table {#table_engine-mergetree-creating-a-table}
|
||||||
|
|
||||||
``` sql
|
``` sql
|
||||||
|
Loading…
Reference in New Issue
Block a user