MergeTree tables settings

## compress\_marks[​](#compress_marks "Direct link to compress_marks")

Marks support compression, reduce mark file size and speed up network
transmission.

## compress\_per\_column\_in\_compact\_parts[​](#compress_per_column_in_compact_parts "Direct link to compress_per_column_in_compact_parts")

Controls the physical layout of Compact parts. If true (default), each column in a granule
starts a new compressed block, allowing ClickHouse to skip reading unnecessary columns
from disk. If false, all columns within a granule are packed into the same compressed block,
improving compression ratio but requiring more data to be decompressed during reads.
This is beneficial for workloads that always read all columns (e.g. projections).

## compress\_primary\_key[​](#compress_primary_key "Direct link to compress_primary_key")

Primary key support compression, reduce primary key file size and speed up
network transmission.

## concurrent\_part\_removal\_threshold[​](#concurrent_part_removal_threshold "Direct link to concurrent_part_removal_threshold")

Activate concurrent part removal (see 'max\_part\_removal\_threads') only if
the number of inactive data parts is at least this.

## deduplicate\_merge\_projection\_mode[​](#deduplicate_merge_projection_mode "Direct link to deduplicate_merge_projection_mode")

Whether to allow create projection for the table with non-classic MergeTree,
that is not (Replicated, Shared) MergeTree. Ignore option is purely for
compatibility which might result in incorrect answer. Otherwise, if allowed,
what is the action when merge projections, either drop or rebuild. So classic
MergeTree would ignore this setting. It also controls `OPTIMIZE DEDUPLICATE`
as well, but has effect on all MergeTree family members. Similar to the
option `lightweight_mutation_projection_mode`, it is also part level.

Possible values:

- `ignore`
- `throw`
- `drop`
- `rebuild`

## default\_compression\_codec[​](#default_compression_codec "Direct link to default_compression_codec")

Specifies the default compression codec to be used if none is defined for a particular column in the table declaration.
Compression codec selecting order for a column:

1. Compression codec defined for the column in the table declaration
2. Compression codec defined in `default_compression_codec` (this setting)
3. Default compression codec defined in `compression` settings
   Default value: an empty string (not defined).

## detach\_not\_byte\_identical\_parts[​](#detach_not_byte_identical_parts "Direct link to detach_not_byte_identical_parts")

Enables or disables detaching a data part on a replica after a merge or a
mutation, if it is not byte-identical to data parts on other replicas. If
disabled, the data part is removed. Activate this setting if you want to
analyze such parts later.

The setting is applicable to `MergeTree` tables with enabled
[data replication](/docs/engines/table-engines/mergetree-family/replacingmergetree).

Possible values:

- `0` — Parts are removed.
- `1` — Parts are detached.

## detach\_old\_local\_parts\_when\_cloning\_replica[​](#detach_old_local_parts_when_cloning_replica "Direct link to detach_old_local_parts_when_cloning_replica")

Do not remove old local parts when repairing lost replica.

Possible values:

- `true`
- `false`

## disable\_detach\_partition\_for\_zero\_copy\_replication[​](#disable_detach_partition_for_zero_copy_replication "Direct link to disable_detach_partition_for_zero_copy_replication")

Disable DETACH PARTITION query for zero copy replication.

## disable\_fetch\_partition\_for\_zero\_copy\_replication[​](#disable_fetch_partition_for_zero_copy_replication "Direct link to disable_fetch_partition_for_zero_copy_replication")

Disable FETCH PARTITION query for zero copy replication.

## disable\_freeze\_partition\_for\_zero\_copy\_replication[​](#disable_freeze_partition_for_zero_copy_replication "Direct link to disable_freeze_partition_for_zero_copy_replication")

Disable FREEZE PARTITION query for zero copy replication.

## disk[​](#disk "Direct link to disk")

Name of storage disk. Can be specified instead of storage policy.

## distributed\_index\_analysis\_min\_indexes\_bytes\_to\_activate[​](#distributed_index_analysis_min_indexes_bytes_to_activate "Direct link to distributed_index_analysis_min_indexes_bytes_to_activate")

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

Minimal index sizes (data skipping and primary key) on disk (but uncompressed) to activated distributed index analysis

## distributed\_index\_analysis\_min\_parts\_to\_activate[​](#distributed_index_analysis_min_parts_to_activate "Direct link to distributed_index_analysis_min_parts_to_activate")

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

Minimal number of parts to activated distributed index analysis

## dynamic\_serialization\_version[​](#dynamic_serialization_version "Direct link to dynamic_serialization_version")

Serialization version for Dynamic data type. Required for compatibility.

Possible values:

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

## enable\_block\_number\_column[​](#enable_block_number_column "Direct link to enable_block_number_column")

Enable persisting column \_block\_number for each row.

## enable\_block\_offset\_column[​](#enable_block_offset_column "Direct link to enable_block_offset_column")

Persists virtual column `_block_number` on merges.

## enable\_index\_granularity\_compression[​](#enable_index_granularity_compression "Direct link to enable_index_granularity_compression")

Compress in memory values of index granularity if it is possible

## enable\_max\_bytes\_limit\_for\_min\_age\_to\_force\_merge[​](#enable_max_bytes_limit_for_min_age_to_force_merge "Direct link to enable_max_bytes_limit_for_min_age_to_force_merge")

If settings `min_age_to_force_merge_seconds` and
`min_age_to_force_merge_on_partition_only` should respect setting
`max_bytes_to_merge_at_max_space_in_pool`.

Possible values:

- `true`
- `false`

## enable\_mixed\_granularity\_parts[​](#enable_mixed_granularity_parts "Direct link to enable_mixed_granularity_parts")

Enables or disables transitioning to control the granule size with the
`index_granularity_bytes` setting. Before version 19.11, there was only the
`index_granularity` setting for restricting granule size. The
`index_granularity_bytes` setting improves ClickHouse performance when
selecting data from tables with big rows (tens and hundreds of megabytes).
If you have tables with big rows, you can enable this setting for the tables
to improve the efficiency of `SELECT` queries.

## enable\_replacing\_merge\_with\_cleanup\_for\_min\_age\_to\_force\_merge[​](#enable_replacing_merge_with_cleanup_for_min_age_to_force_merge "Direct link to enable_replacing_merge_with_cleanup_for_min_age_to_force_merge")

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

Whether to use CLEANUP merges for ReplacingMergeTree when merging partitions
down to a single part. Requires `allow_experimental_replacing_merge_with_cleanup`,
`min_age_to_force_merge_seconds` and `min_age_to_force_merge_on_partition_only`
to be enabled.

Possible values:

- `true`
- `false`

## enable\_the\_endpoint\_id\_with\_zookeeper\_name\_prefix[​](#enable_the_endpoint_id_with_zookeeper_name_prefix "Direct link to enable_the_endpoint_id_with_zookeeper_name_prefix")

Enable the endpoint id with zookeeper name prefix for the replicated merge
tree table.

## enable\_vertical\_merge\_algorithm[​](#enable_vertical_merge_algorithm "Direct link to enable_vertical_merge_algorithm")

Enable usage of Vertical merge algorithm.

## enforce\_index\_structure\_match\_on\_partition\_manipulation[​](#enforce_index_structure_match_on_partition_manipulation "Direct link to enforce_index_structure_match_on_partition_manipulation")