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

# map_serialization_version_* MergeTree テーブル設定

> map_serialization_version_* の生成グループに属する 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="map_serialization_version">
  ## map\_serialization\_version
</div>

<SettingsInfoBlock type="MergeTreeMapSerializationVersion" default_value="basic" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.3"},{"label": "basic"},{"label": "Map のシリアル化バージョンを制御する設定を追加"}]}]} />

`Map` カラムで使用するシリアライゼーション方式を制御します。

設定可能な値:

* basic — `Map` に標準のシリアライゼーションを使用します。
* with\_buckets — シリアライゼーション時にキーをバケットに分割します。バケットを使用すると、Map から個々のキーを読み取る効率が向上します。

`with_buckets` シリアライゼーションのバケット数は、[max\_buckets\_in\_map](/docs/ja/reference/settings/merge-tree-settings/max#max_buckets_in_map) と [map\_buckets\_strategy](/docs/ja/reference/settings/merge-tree-settings/map-buckets#map_buckets_strategy) で決まります。

<div id="map_serialization_version_for_zero_level_parts">
  ## map\_serialization\_version\_for\_zero\_level\_parts
</div>

<SettingsInfoBlock type="MergeTreeMapSerializationVersion" default_value="basic" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.3"},{"label": "basic"},{"label": "ゼロレベルのパーツに対する Map のシリアライゼーション バージョンを制御する設定を追加"}]}]} />

この設定では、insert 時に作成されるゼロレベルのパーツに対して、
`Map` カラムの別のシリアライゼーション バージョンを指定できます。
これにより、マージ済みパーツでは `with_buckets` を使用しつつ、insert 時のパフォーマンス低下を避けるために、
ゼロレベルのパーツでは `basic` シリアライゼーションを維持できます。
