Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

merge_selector_* MergeTree table settings

These settings are available in system.merge_tree_settings and are autogenerated from ClickHouse source.

merge_selector_algorithm

Experimental feature
Type
MergeSelectorAlgorithm
Default
Simple

The algorithm to select parts for merges assignment

merge_selector_base

Type
Float
Default
5

Affects write amplification of assigned merges (expert level setting, don’t change if you don’t understand what it is doing). Works for Simple and StochasticSimple merge selectors

merge_selector_blurry_base_scale_factor

Type
UInt64
Default
0

Controls when the logic kicks in relatively to the number of parts in partition. The bigger the factor the more belated reaction will be.

merge_selector_enable_heuristic_to_lower_max_parts_to_merge_at_once

Type
Bool
Default
1
Version history
VersionDefault valueComment
26.71Enable by default
25.120New setting

Enable heuristic for simple merge selector which will lower maximum limit for merge choice. By doing so number of concurrent merges will increase which can help with TOO_MANY_PARTS errors but at the same time this will increase the write amplification.

merge_selector_enable_heuristic_to_remove_small_parts_at_right

Type
Bool
Default
1

Enable heuristic for selecting parts for merge which removes parts from right side of range, if their size is less than specified ratio (0.01) of sum_size. Works for Simple and StochasticSimple merge selectors

merge_selector_heuristic_to_lower_max_parts_to_merge_at_once_exponent

Experimental feature
Type
UInt64
Default
5
Version history
VersionDefault valueComment
25.125New setting

Controls the exponent value used in formulae building lowering curve. Lowering exponent will lower merge widths which will trigger increase in write amplification. The reverse is also true.

merge_selector_window_size

Type
UInt64
Default
1000

How many parts to look at once.

Navigation