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

# cache_populated_by_fetch_* MergeTree 表设置

> cache_populated_by_fetch_* 自动生成分组中的 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/zh/reference/system-tables/merge_tree_settings) 中查看，且由 ClickHouse 源代码自动生成。

<div id="cache_populated_by_fetch">
  ## cache\_populated\_by\_fetch
</div>

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

<Note>
  此设置仅适用于 ClickHouse Cloud。
</Note>

当 `cache_populated_by_fetch` 被禁用时 (默认设置) ，新的数据分区片段
只有在运行了需要这些数据分区片段的查询后，才会被加载到文件系统缓存中。

如果启用，`cache_populated_by_fetch` 则会使所有节点将新的数据分区片段
从存储加载到各自的文件系统缓存中，而无需由查询来触发此操作。

**另请参阅**

* [ignore\_cold\_parts\_seconds](/docs/zh/reference/settings/session-settings#ignore_cold_parts_seconds)
* [prefer\_warmed\_unmerged\_parts\_seconds](/docs/zh/reference/settings/session-settings#prefer_warmed_unmerged_parts_seconds)
* [cache\_warmer\_threads](/docs/zh/reference/settings/session-settings#cache_warmer_threads)

<div id="cache_populated_by_fetch_filename_regexp">
  ## cache\_populated\_by\_fetch\_filename\_regexp
</div>

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.6"},{"label": ""},{"label": "新增设置"}]}]} />

<Note>
  此设置仅适用于 ClickHouse Cloud。
</Note>

若非空，则仅会在拉取后将与此正则表达式匹配的文件预热到缓存中 (前提是已启用 `cache_populated_by_fetch`) 。
