> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# number_of_* MergeTree table settings

> ClickHouse MergeTree table settings in the number_of_* generated group.

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>Type</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>Default</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          Changeable without restart
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

These settings are available in [system.merge\_tree\_settings](/docs/reference/system-tables/merge_tree_settings) and are autogenerated from ClickHouse source.

<h2 id="number_of_free_entries_in_pool_to_execute_mutation">
  number\_of\_free\_entries\_in\_pool\_to\_execute\_mutation
</h2>

<SettingsInfoBlock type="UInt64" default_value="20" />

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/reference/settings/server-settings/settings#background_pool_size)

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

<h2 id="number_of_free_entries_in_pool_to_execute_optimize_entire_partition">
  number\_of\_free\_entries\_in\_pool\_to\_execute\_optimize\_entire\_partition
</h2>

<SettingsInfoBlock type="UInt64" default_value="25" />

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/reference/settings/server-settings/settings#background_pool_size)

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

<h2 id="number_of_free_entries_in_pool_to_lower_max_size_of_merge">
  number\_of\_free\_entries\_in\_pool\_to\_lower\_max\_size\_of\_merge
</h2>

<SettingsInfoBlock type="UInt64" default_value="8" />

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.

<h2 id="number_of_mutations_to_delay">
  number\_of\_mutations\_to\_delay
</h2>

<SettingsInfoBlock type="UInt64" default_value="500" />

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

<h2 id="number_of_mutations_to_throw">
  number\_of\_mutations\_to\_throw
</h2>

<SettingsInfoBlock type="UInt64" default_value="1000" />

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

<h2 id="number_of_partitions_to_consider_for_merge">
  number\_of\_partitions\_to\_consider\_for\_merge
</h2>

<SettingsInfoBlock type="UInt64" default_value="10" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "10"},{"label": "Cloud sync"}]}]} />

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.
