MergeTree tables settings

## reduce\_blocking\_parts\_sleep\_ms[​](#reduce_blocking_parts_sleep_ms "Direct link to reduce_blocking_parts_sleep_ms")

Only available in ClickHouse Cloud. Minimum time to wait before trying to
reduce blocking parts again after no ranges were dropped/replaced. A lower
setting will trigger tasks in background\_schedule\_pool frequently which
results in large amount of requests to zookeeper in large-scale clusters

## refresh\_parts\_interval[​](#refresh_parts_interval "Direct link to refresh_parts_interval")

If it is greater than zero - refresh the list of data parts from the underlying filesystem to check if the data was updated under the hood.
It can be set only if the table is located on readonly disks (which means that this is a readonly replica, while data is being written by another replica).

## refresh\_statistics\_interval[​](#refresh_statistics_interval "Direct link to refresh_statistics_interval")

The interval of refreshing statistics cache in seconds. If it is set to zero, the refreshing will be disabled.

## remote\_fs\_execute\_merges\_on\_single\_replica\_time\_threshold[​](#remote_fs_execute_merges_on_single_replica_time_threshold "Direct link to remote_fs_execute_merges_on_single_replica_time_threshold")

When this setting has a value greater than zero only a single replica starts
the merge immediately if merged part on shared storage.

Note

Zero-copy replication is not ready for production
Zero-copy replication is disabled by default in ClickHouse version 22.8 and
higher.

This feature is not recommended for production use.

Possible values:

- Any positive integer.

## remote\_fs\_zero\_copy\_path\_compatible\_mode[​](#remote_fs_zero_copy_path_compatible_mode "Direct link to remote_fs_zero_copy_path_compatible_mode")

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

Run zero-copy in compatible mode during conversion process.

## remote\_fs\_zero\_copy\_zookeeper\_path[​](#remote_fs_zero_copy_zookeeper_path "Direct link to remote_fs_zero_copy_zookeeper_path")

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

ZooKeeper path for zero-copy table-independent info.

## remove\_empty\_parts[​](#remove_empty_parts "Direct link to remove_empty_parts")

Remove empty parts after they were pruned by TTL, mutation, or collapsing
merge algorithm.

## remove\_rolled\_back\_parts\_immediately[​](#remove_rolled_back_parts_immediately "Direct link to remove_rolled_back_parts_immediately")

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

Setting for an incomplete experimental feature.

## remove\_unused\_patch\_parts[​](#remove_unused_patch_parts "Direct link to remove_unused_patch_parts")

Remove in background patch parts which are applied for all active parts.

## replace\_long\_file\_name\_to\_hash[​](#replace_long_file_name_to_hash "Direct link to replace_long_file_name_to_hash")

If the file name for column is too long (more than 'max\_file\_name\_length'
bytes) replace it to SipHash128

## replicated\_can\_become\_leader[​](#replicated_can_become_leader "Direct link to replicated_can_become_leader")

If true, replicated tables replicas on this node will try to acquire
leadership.

Possible values:

- `true`
- `false`

## replicated\_deduplication\_window[​](#replicated_deduplication_window "Direct link to replicated_deduplication_window")

The number of most recently inserted blocks for which ClickHouse Keeper stores
hash sums to check for duplicates.

Possible values:

- Any positive integer.
- 0 (disable deduplication)

The `Insert` command creates one or more blocks (parts). For
[insert deduplication](/docs/engines/table-engines/mergetree-family/replication),
when writing into replicated tables, ClickHouse writes the hash sums of the
created parts into ClickHouse Keeper. Hash sums are stored only for the most
recent `replicated_deduplication_window` blocks. The oldest hash sums are
removed from ClickHouse Keeper.

A large number for `replicated_deduplication_window` slows down `Inserts`
because more entries need to be compared. The hash sum is calculated from
the composition of the field names and types and the data of the inserted
part (stream of bytes).

## replicated\_deduplication\_window\_for\_async\_inserts[​](#replicated_deduplication_window_for_async_inserts "Direct link to replicated_deduplication_window_for_async_inserts")

The number of most recently async inserted blocks for which ClickHouse Keeper
stores hash sums to check for duplicates.

Possible values:

- Any positive integer.
- 0 (disable deduplication for async\_inserts)

The [Async Insert](/docs/operations/settings/settings#async_insert) command will
be cached in one or more blocks (parts). For [insert deduplication](/docs/engines/table-engines/mergetree-family/replication),
when writing into replicated tables, ClickHouse writes the hash sums of each
insert into ClickHouse Keeper. Hash sums are stored only for the most recent
`replicated_deduplication_window_for_async_inserts` blocks. The oldest hash
sums are removed from ClickHouse Keeper.
A large number of `replicated_deduplication_window_for_async_inserts` slows
down `Async Inserts` because it needs to compare more entries.
The hash sum is calculated from the composition of the field names and types
and the data of the insert (stream of bytes).

## replicated\_deduplication\_window\_seconds[​](#replicated_deduplication_window_seconds "Direct link to replicated_deduplication_window_seconds")

The number of seconds after which the hash sums of the inserted blocks are
removed from ClickHouse Keeper.

Possible values:

- Any positive integer.

Similar to [replicated\_deduplication\_window](#replicated_deduplication_window),
`replicated_deduplication_window_seconds` specifies how long to store hash
sums of blocks for insert deduplication. Hash sums older than
`replicated_deduplication_window_seconds` are removed from ClickHouse Keeper,
even if they are less than  `replicated_deduplication_window`.

The time is relative to the time of the most recent record, not to the wall
time. If it's the only record it will be stored forever.

## replicated\_deduplication\_window\_seconds\_for\_async\_inserts[​](#replicated_deduplication_window_seconds_for_async_inserts "Direct link to replicated_deduplication_window_seconds_for_async_inserts")

The number of seconds after which the hash sums of the async inserts are
removed from ClickHouse Keeper.

Possible values:

- Any positive integer.

Similar to [replicated\_deduplication\_window\_for\_async\_inserts](#replicated_deduplication_window_for_async_inserts),
`replicated_deduplication_window_seconds_for_async_inserts` specifies how
long to store hash sums of blocks for async insert deduplication. Hash sums
older than `replicated_deduplication_window_seconds_for_async_inserts` are
removed from ClickHouse Keeper, even if they are less than
`replicated_deduplication_window_for_async_inserts`.

The time is relative to the time of the most recent record, not to the wall
time. If it's the only record it will be stored forever.

## replicated\_fetches\_http\_connection\_timeout[​](#replicated_fetches_http_connection_timeout "Direct link to replicated_fetches_http_connection_timeout")

Obsolete setting, does nothing.

## replicated\_fetches\_http\_receive\_timeout[​](#replicated_fetches_http_receive_timeout "Direct link to replicated_fetches_http_receive_timeout")

Obsolete setting, does nothing.

## replicated\_fetches\_http\_send\_timeout[​](#replicated_fetches_http_send_timeout "Direct link to replicated_fetches_http_send_timeout")

Obsolete setting, does nothing.

## replicated\_fetches\_min\_part\_level[​](#replicated_fetches_min_part_level "Direct link to replicated_fetches_min_part_level")