Documentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
UPDATE statements. It forcefully applies pending patches to the data parts by rewriting only the affected columns.
- It only works for tables in the
MergeTreefamily (including replicated tables). - This is a mutation operation and executes asynchronously in the background.
When to use APPLY PATCHES
Patch parts are normally applied automatically during merges when theapply_patches_on_merge setting is enabled (default). However, you may want to manually trigger patch application in these scenarios:
- To reduce the overhead of applying patches during
SELECTqueries - To consolidate multiple patch parts before they accumulate
- To prepare data for backup or export with patches already materialized
- When
apply_patches_on_mergeis disabled and you want to control when patches are applied
Examples
Apply all pending patches for a table:Monitoring patch application
You can monitor the progress of patch application using thesystem.mutations table:
See also
- Lightweight
UPDATE- Create patch parts with lightweight updates apply_patches_on_mergesetting - Control automatic patch application during merges