> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-detect-table-modification.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# iceberg_compaction_* セッション設定

> iceberg_compaction_* 生成グループに含まれる ClickHouse のセッション設定。

export const VersionHistory = ({rows = []}) => {
  if (rows.length === 0) {
    return null;
  }
  const headers = ["バージョン", "デフォルト値", "コメント"];
  const border = "1px solid rgba(128, 128, 128, 0.3)";
  const cell = {
    border,
    padding: "0.25rem 0.5rem",
    textAlign: "start",
    verticalAlign: "top"
  };
  return <details className="not-prose" style={{
    border,
    borderRadius: "0.5rem",
    margin: "0.5rem 0",
    padding: "0.5rem 0.75rem",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <summary style={{
    cursor: "pointer",
    fontWeight: 600,
    opacity: 0.72
  }}>
        バージョン履歴
      </summary>
      <table style={{
    borderCollapse: "collapse",
    width: "100%",
    margin: "0.5rem 0 0"
  }}>
        <thead>
          <tr>
            {headers.map(header => <th key={header} style={{
    ...cell,
    fontWeight: 600,
    opacity: 0.72
  }}>
                {header}
              </th>)}
          </tr>
        </thead>
        <tbody>
          {rows.map((row, row_index) => <tr key={row.id ?? row_index}>
              {(row.items ?? []).map((item, item_index) => <td key={item_index} style={{
    ...cell,
    overflowWrap: "anywhere"
  }}>
                  {item?.label}
                </td>)}
            </tr>)}
        </tbody>
      </table>
    </details>;
};

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.settings](/ja/reference/system-tables/settings) で利用でき、[ソースコード](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) から自動生成されています。

<div id="iceberg_compaction_commit_batch_size">
  ## iceberg\_compaction\_commit\_batch\_size
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.9"},{"label": "100"},{"label": "新しい設定"}]}, {"id": "row-2","items": [{"label": "26.8"},{"label": "100"},{"label": "新しい設定"}]}]} />

バックグラウンドの Iceberg コンパクション が、新しい snapshot でパブリッシュするまでに蓄積する、マージ済みデータファイルの数です。

コンパクション の候補がなくなった時点で、コンパクション の結果は必ずパブリッシュされます。したがって、この設定で制限されるのは、コンパクション が新たな処理対象を見つけ続けている間、すでにマージされたファイルが未パブリッシュのまま保持される時間だけです。`0` を指定すると、コンパクション の候補が尽きた場合にのみパブリッシュする従来の動作に戻ります。table が新しいデータファイルを受け取り続けている間はこの状態に到達しないため、マージ済みの出力はすべて object storage に書き込まれますが、snapshot から参照されることはありません。

<div id="iceberg_compaction_data_cleanup">
  ## iceberg\_compaction\_data\_cleanup
</div>

<SettingsInfoBlock type="Seconds" default_value="10800" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": "10800"},{"label": "新しい設定"}]}]} />

この時間を過ぎると、データは削除されます。

<div id="iceberg_compaction_delay_bias">
  ## iceberg\_compaction\_delay\_bias
</div>

<SettingsInfoBlock type="Seconds" default_value="10800" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": "10800"},{"label": "新しい設定"}]}]} />

2 回のバックグラウンド コンパクション 操作の最小間隔。

<div id="iceberg_compaction_max_bytes_in_data_file">
  ## iceberg\_compaction\_max\_bytes\_in\_data\_file
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.9"},{"label": "18446744073709551615"},{"label": "挿入時の上限とは別に、コンパクション で生成される Iceberg データファイルの最大バイト数を指定する新しい設定。"}]}, {"id": "row-2","items": [{"label": "26.7"},{"label": "18446744073709551615"},{"label": "挿入時の上限とは別に、コンパクション で生成される Iceberg データファイルの最大バイト数を指定する新しい設定。"}]}]} />

コンパクション で生成される Iceberg Parquet データファイルの最大バイト数。デフォルトでは最大値に設定されているため、コンパクション は対象ファイルを可能な限り少ない出力ファイルにマージします。

<div id="iceberg_compaction_max_rows_in_data_file">
  ## iceberg\_compaction\_max\_rows\_in\_data\_file
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.9"},{"label": "18446744073709551615"},{"label": "コンパクションで生成される Iceberg データファイルの最大行数に関する新しい設定。挿入時の上限とは別に設定されます。"}]}, {"id": "row-2","items": [{"label": "26.7"},{"label": "18446744073709551615"},{"label": "コンパクションで生成される Iceberg データファイルの最大行数に関する新しい設定。挿入時の上限とは別に設定されます。"}]}]} />

コンパクションで生成される Iceberg Parquet データファイルの最大行数。デフォルトでは最大値に設定されており、コンパクションは対象ファイルを可能な限り少ない出力ファイルにマージします。この値をコンパクションで実際に生成可能なサイズより大きくすると、すべての出力ファイルが `iceberg_data_file_size_lower_threshold_compaction` 未満のままとなり、永続的に再選択されます。
