> ## 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.

# write_* MergeTree テーブル設定

> write_* グループに含まれる 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="write_final_mark">
  ## write\_final\_mark
</div>

<SettingsInfoBlock type="Bool" default_value="1" />

廃止された設定で、効果はありません。

<div id="write_marks_for_substreams_in_compact_parts">
  ## write\_marks\_for\_substreams\_in\_compact\_parts
</div>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.8"},{"label": "1"},{"label": "compact パーツでサブストリームごとにデフォルトでマークを書き込むことを有効にする"}]}, {"id": "row-2","items": [{"label": "25.5"},{"label": "0"},{"label": "新しい設定"}]}]} />

compact パーツで、各カラムごとではなく各サブストリームごとにマークを書き込むようにします。
これにより、データパーツから個々のサブカラムを効率的に読み取れるようになります。

たとえば、カラム `t Tuple(a String, b UInt32, c Array(Nullable(UInt32)))` は次のサブストリームにシリアライズされます。

* `t.a` はタプル要素 `a` の String データ
* `t.b` はタプル要素 `b` の UInt32 データ
* `t.c.size0` はタプル要素 `c` の配列サイズ
* `t.c.null` はタプル要素 `c` のネストされた配列要素の NULL マップ
* `t.c` はタプル要素 `c` のネストされた配列要素の UInt32 データ

この設定を有効にすると、これら 5 つのサブストリームそれぞれにマークが書き込まれます。つまり、必要に応じてグラニュールから各サブストリームのデータを個別に読み取れるようになります。たとえば、サブカラム `t.c` を読み取りたい場合は、サブストリーム `t.c.size0`、`t.c.null`、`t.c` のデータだけを読み取り、
サブストリーム `t.a` と `t.b` のデータは読み取りません。この設定が無効な場合は、
最上位カラム `t` に対してのみマークが書き込まれるため、一部のサブストリームのデータだけが必要な場合でも、グラニュールから常にカラムデータ全体を読み取ることになります。
