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

# map_serialization_version_* MergeTree テーブル設定

> map_serialization_version_* の生成グループに属する ClickHouse MergeTree テーブル設定。

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.merge\_tree\_settings](/ja/reference/system-tables/merge_tree_settings) で確認でき、ClickHouse のソースから自動生成されています。

<div id="map_serialization_version">
  ## map\_serialization\_version
</div>

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

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

設定可能な値:

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

`with_buckets` シリアライゼーションのバケット数は、[max\_buckets\_in\_map](/ja/reference/settings/merge-tree-settings/max#max_buckets_in_map) と [map\_buckets\_strategy](/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" />

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