MergeTree tables settings

## min\_parts\_to\_merge\_at\_once[​](#min_parts_to_merge_at_once "Direct link to min_parts_to_merge_at_once")

Minimal amount of data parts which merge selector can pick to merge at once
(expert level setting, don't change if you don't understand what it is doing).
0 - disabled. Works for Simple and StochasticSimple merge selectors.

## min\_relative\_delay\_to\_close[​](#min_relative_delay_to_close "Direct link to min_relative_delay_to_close")

Minimal delay from other replicas to close, stop serving
requests and not return Ok during status check.

## min\_relative\_delay\_to\_measure[​](#min_relative_delay_to_measure "Direct link to min_relative_delay_to_measure")

Calculate relative replica delay only if absolute delay is not less that
this value.

## min\_relative\_delay\_to\_yield\_leadership[​](#min_relative_delay_to_yield_leadership "Direct link to min_relative_delay_to_yield_leadership")

Obsolete setting, does nothing.

## min\_replicated\_logs\_to\_keep[​](#min_replicated_logs_to_keep "Direct link to min_replicated_logs_to_keep")

Keep about this number of last records in ZooKeeper log, even if they are
obsolete. It doesn't affect work of tables: used only to diagnose ZooKeeper
log before cleaning.

Possible values:

- Any positive integer.

## min\_rows\_for\_compact\_part[​](#min_rows_for_compact_part "Direct link to min_rows_for_compact_part")

Obsolete setting, does nothing.

## min\_rows\_for\_full\_part\_storage[​](#min_rows_for_full_part_storage "Direct link to min_rows_for_full_part_storage")

Only available in ClickHouse Cloud. Minimal number of rows to use full type
of storage for data part instead of packed

## min\_rows\_for\_wide\_part[​](#min_rows_for_wide_part "Direct link to min_rows_for_wide_part")

Minimal number of rows to create a data part in `Wide` format instead of `Compact`.

## min\_rows\_to\_fsync\_after\_merge[​](#min_rows_to_fsync_after_merge "Direct link to min_rows_to_fsync_after_merge")

Minimal number of rows to do fsync for part after merge (0 - disabled)

## mutation\_workload[​](#mutation_workload "Direct link to mutation_workload")

Used to regulate how resources are utilized and shared between mutations and
other workloads. Specified value is used as `workload` setting value for
background mutations of this table. If not specified (empty string), then
server setting `mutation_workload` is used instead.

**See Also**

- [Workload Scheduling](/docs/operations/workload-scheduling)

## non\_replicated\_deduplication\_window[​](#non_replicated_deduplication_window "Direct link to non_replicated_deduplication_window")

The number of the most recently inserted blocks in the non-replicated
[MergeTree](/docs/engines/table-engines/mergetree-family/mergetree) table
for which hash sums are stored to check for duplicates.

Possible values:

- Any positive integer.
- `0` (disable deduplication).

A deduplication mechanism is used, similar to replicated tables (see
[replicated\_deduplication\_window](#replicated_deduplication_window) setting).
The hash sums of the created parts are written to a local file on a disk.

## notify\_newest\_block\_number[​](#notify_newest_block_number "Direct link to notify_newest_block_number")

Experimental feature. [Learn more.](/docs/beta-and-experimental-features#experimental-features)

Notify newest block number to SharedJoin or SharedSet. Only in ClickHouse Cloud.

## nullable\_serialization\_version[​](#nullable_serialization_version "Direct link to nullable_serialization_version")

Controls the serialization method used for `Nullable(T)` columns.

Possible values:

- basic — Use the standard serialization for `Nullable(T)`.
- allow\_sparse — Permit `Nullable(T)` to use sparse encoding.

## number\_of\_free\_entries\_in\_pool\_to\_execute\_mutation[​](#number_of_free_entries_in_pool_to_execute_mutation "Direct link to number_of_free_entries_in_pool_to_execute_mutation")

When there is less than specified number of free entries in pool, do not
execute part mutations. This is to leave free threads for regular merges and
to avoid "Too many parts" errors.

Possible values:

- Any positive integer.

**Usage**

The value of the `number_of_free_entries_in_pool_to_execute_mutation` setting
should be less than the value of the [background\_pool\_size](/docs/operations/server-configuration-parameters/settings#background_pool_size)

- [background\_merges\_mutations\_concurrency\_ratio](/docs/operations/server-configuration-parameters/settings#background_merges_mutations_concurrency_ratio).
  Otherwise, ClickHouse will throw an exception.

## number\_of\_free\_entries\_in\_pool\_to\_execute\_optimize\_entire\_partition[​](#number_of_free_entries_in_pool_to_execute_optimize_entire_partition "Direct link to number_of_free_entries_in_pool_to_execute_optimize_entire_partition")

When there is less than specified number of free entries in pool, do not
execute optimizing entire partition in the background (this task generated
when set `min_age_to_force_merge_seconds` and enable
`min_age_to_force_merge_on_partition_only`). This is to leave free threads
for regular merges and avoid "Too many parts".

Possible values:

- Positive integer.

The value of the `number_of_free_entries_in_pool_to_execute_optimize_entire_partition`
setting should be less than the value of the
[background\_pool\_size](/docs/operations/server-configuration-parameters/settings#background_pool_size)

- [background\_merges\_mutations\_concurrency\_ratio](/docs/operations/server-configuration-parameters/settings#background_merges_mutations_concurrency_ratio).
  Otherwise, ClickHouse throws an exception.

## number\_of\_free\_entries\_in\_pool\_to\_lower\_max\_size\_of\_merge[​](#number_of_free_entries_in_pool_to_lower_max_size_of_merge "Direct link to number_of_free_entries_in_pool_to_lower_max_size_of_merge")

When there is less than the specified number of free entries in pool
(or replicated queue), start to lower maximum size of merge to process
(or to put in queue).
This is to allow small merges to process - not filling the pool with long
running merges.

Possible values:

- Any positive integer.

## number\_of\_mutations\_to\_delay[​](#number_of_mutations_to_delay "Direct link to number_of_mutations_to_delay")

If table has at least
that many unfinished mutations, artificially slow down mutations of table.
Disabled if set to 0

## number\_of\_mutations\_to\_throw[​](#number_of_mutations_to_throw "Direct link to number_of_mutations_to_throw")

If table has at least that many unfinished mutations, throw 'Too many mutations'
exception. Disabled if set to 0

## number\_of\_partitions\_to\_consider\_for\_merge[​](#number_of_partitions_to_consider_for_merge "Direct link to number_of_partitions_to_consider_for_merge")

Only available in ClickHouse Cloud. Up to top N partitions which we will
consider for merge. Partitions picked in a random weighted way where weight
is amount of data parts which can be merged in this partition.

## object\_serialization\_version[​](#object_serialization_version "Direct link to object_serialization_version")

Serialization version for JSON data type. Required for compatibility.

Possible values:

- `v1`
- `v2`
- `v3`

Only version `v3` supports changing the shared data serialization version.

## object\_shared\_data\_buckets\_for\_compact\_part[​](#object_shared_data_buckets_for_compact_part "Direct link to object_shared_data_buckets_for_compact_part")

The number of buckets for JSON shared data serialization in Compact parts. Works with `map_with_buckets` and `advanced` shared data serializations.
The maximum allowed value is 256.

## object\_shared\_data\_buckets\_for\_wide\_part[​](#object_shared_data_buckets_for_wide_part "Direct link to object_shared_data_buckets_for_wide_part")

The number of buckets for JSON shared data serialization in Wide parts. Works with `map_with_buckets` and `advanced` shared data serializations.
The maximum allowed value is 256.

## object\_shared\_data\_serialization\_version[​](#object_shared_data_serialization_version "Direct link to object_shared_data_serialization_version")

Serialization version for shared data inside JSON data type.