> ## 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 テーブル設定

> number_of_* グループに分類される ClickHouse の MergeTree テーブル設定。

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
  }}>型</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>デフォルト値</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          再起動せずに変更可能
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

これらの設定は [system.merge\_tree\_settings](/docs/ja/reference/system-tables/merge_tree_settings) で利用でき、ClickHouseのソースコードから自動生成されています。

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

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

プール内の空きエントリ数が指定した数未満の場合、
part mutation は実行されません。これは、通常のマージ用の空きスレッドを確保し、
「パーツが多すぎる」エラーを回避するためです。

設定可能な値:

* 任意の正の整数。

**使用方法**

`number_of_free_entries_in_pool_to_execute_mutation` 設定の値は、
[background\_pool\_size](/docs/ja/reference/settings/server-settings/settings#background_pool_size) の値より小さくする必要があります

* [background\_merges\_mutations\_concurrency\_ratio](/docs/ja/reference/settings/server-settings/settings#background_merges_mutations_concurrency_ratio)。
  そうしないと、ClickHouse は例外をスローします。

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

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

プール内の空きエントリ数が指定した数を下回る場合、バックグラウンドでパーティション全体の最適化は実行されません (このタスクは
`min_age_to_force_merge_seconds` を設定し、
`min_age_to_force_merge_on_partition_only` を有効にすると生成されます) 。これは、通常のマージ用の空きスレッドを確保し、
「パーツが多すぎる」を回避するためです。

設定可能な値:

* 正の整数。

`number_of_free_entries_in_pool_to_execute_optimize_entire_partition`
設定の値は、
[background\_pool\_size](/docs/ja/reference/settings/server-settings/settings#background_pool_size)

* [background\_merges\_mutations\_concurrency\_ratio](/docs/ja/reference/settings/server-settings/settings#background_merges_mutations_concurrency_ratio) の値より小さくする必要があります。
  そうでない場合、ClickHouse は例外をスローします。

<div 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
</div>

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

プール 内の空きエントリ数
(または replicated queue 内の空きエントリ数) が指定値を下回ると、
処理する マージ の最大サイズ
(または queue に入れる マージ の最大サイズ) を引き下げ始めます。
これは、小規模な マージ を処理できるようにし、長時間実行される
マージ で プール が埋まるのを防ぐためです。

設定可能な値:

* 任意の正の整数。

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

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

テーブルに少なくとも
この数の未完了の mutation がある場合、テーブルの mutation を意図的に遅くします。
0 に設定すると無効になります

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

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

table に少なくともこの数の未完了の mutation がある場合、'Too many mutations'
例外をスローします。0 に設定すると無効になります

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

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

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

ClickHouse Cloud でのみ利用できます。マージ対象として考慮されるパーティションの最大数です。パーティションは重み付きでランダムに選択され、この重みはそのパーティション内でマージ可能なデータパーツ数に基づきます。
