Skip to main content

Avoid Mutations

Mutations refers to ALTER queries that manipulate table data through deletion or updates. Most notably they are queries like ALTER TABLE … DELETE, UPDATE, etc. Performing such queries will produce new mutated versions of the data parts. This means that such statements would trigger a rewrite of whole data parts for all data that was inserted before the mutation, translating to a large amount of write requests.

For updates, you can avoid these large amounts of write requests by using specialised table engines like ReplacingMergeTree or CollapsingMergeTree instead of the default MergeTree table engine.