These settings are available in system.merge_tree_settings and are autogenerated from ClickHouse source.
merge_max_block_size
The number of rows that are read from the merged parts into memory.
Possible values:
Merge reads rows from parts in blocks of merge_max_block_size rows, then
merges and writes the result into a new part. The read block is placed in RAM,
so merge_max_block_size affects the size of the RAM required for the merge.
Thus, merges can consume a large amount of RAM for tables with very wide rows
(if the average row size is 100kb, then when merging 10 parts,
(100kb * 10 * 8192) = ~ 8GB of RAM). By decreasing merge_max_block_size,
you can reduce the amount of RAM required for a merge but slow down a merge.
merge_max_block_size_bytes
How many bytes in blocks should be formed for merge operations. By default
has the same value as index_granularity_bytes.
merge_max_bytes_to_prewarm_cache
Only available in ClickHouse Cloud. Maximal size of part (compact or packed)
to prewarm cache during merge.
merge_max_dynamic_subcolumns_in_compact_part
The maximum number of dynamic subcolumns that can be created in every column in the Compact data part after merge.
It allows to control the number of dynamic subcolumns in Compact part regardless of dynamic parameters specified in the data type.
For example, if the table has a column with the JSON(max_dynamic_paths=1024) type and the setting merge_max_dynamic_subcolumns_in_compact_part is set to 128,
after merge into the Compact data part number of dynamic paths will be decreased to 128 in this part and only 128 paths will be written as dynamic subcolumns.
merge_max_dynamic_subcolumns_in_wide_part
The maximum number of dynamic subcolumns that can be created in every column in the Wide data part after merge.
It allows to reduce number of files created in Wide data part regardless of dynamic parameters specified in the data type.
For example, if the table has a column with the JSON(max_dynamic_paths=1024) type and the setting merge_max_dynamic_subcolumns_in_wide_part is set to 128,
after merge into the Wide data part number of dynamic paths will be decreased to 128 in this part and only 128 paths will be written as dynamic subcolumns. Last modified on July 23, 2026