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

# materialize_* 会话设置

> 由 materialize_* 生成的设置组中的 ClickHouse 会话设置。

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](/docs/zh/reference/system-tables/settings) 中查看，并由 [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) 自动生成。

<div id="materialize_skip_indexes_on_insert">
  ## materialize\_skip\_indexes\_on\_insert
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.6"},{"label": "1"},{"label": "新增设置，允许禁用在 INSERT 时物化跳过索引"}]}]} />

是否在 INSERT 时构建并存储跳过索引。若禁用，则跳过索引仅会[在合并期间](/docs/zh/reference/settings/merge-tree-settings#materialize_skip_indexes_on_merge)或通过显式执行 [MATERIALIZE INDEX](/docs/zh/reference/statements/alter/skipping-index#materialize-index) 时构建并存储。

另请参见 [exclude\_materialize\_skip\_indexes\_on\_insert](/docs/zh/reference/settings/session-settings/other#exclude_materialize_skip_indexes_on_insert)。

<div id="materialize_statistics_on_insert">
  ## materialize\_statistics\_on\_insert
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.4"},{"label": "0"},{"label": "默认禁用在 INSERT 时构建统计信息，改为依赖合并"}]}, {"id": "row-2","items": [{"label": "24.6"},{"label": "1"},{"label": "新增设置，可禁用在 insert 时物化统计信息"}]}]} />

是否在 INSERT 时构建并插入统计信息。如果禁用，统计信息将在合并期间或通过显式执行 MATERIALIZE STATISTICS 来构建和存储

<div id="materialize_ttl_after_modify">
  ## materialize\_ttl\_after\_modify
</div>

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

执行 ALTER MODIFY TTL 查询后，对旧数据应用生存时间 (TTL) 规则
