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

# read_from_* 会话设置

> ClickHouse read_from_* 生成分组中的会话设置。

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>;
};

export const CloudOnlyBadge = () => {
  return <div className="cloudBadge">
            <div className="cloudIcon">
            <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path fillRule="evenodd" clipRule="evenodd" d="M5.33395 12.6667H12.3739C13.6593 12.6667 14.7073 11.6187 14.7073 10.3334C14.7073 9.04804 13.6593 8.00004 12.3739 8.00004H12.0839V7.33337C12.0839 5.12671 10.2906 3.33337 8.08395 3.33337C6.09928 3.33337 4.45395 4.78537 4.14195 6.68204C2.55728 6.76271 1.29395 8.06204 1.29395 9.66671C1.29395 11.3234 2.63728 12.6667 4.29395 12.6667H5.33395Z" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
            </svg>
        </div>
            {'仅限 ClickHouse Cloud'}
        </div>;
};

这些设置可在 [system.settings](/docs/zh/reference/system-tables/settings) 中查看，并由 [源代码](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) 自动生成。

<div id="read_from_distributed_cache_if_exists_otherwise_bypass_cache">
  ## read\_from\_distributed\_cache\_if\_exists\_otherwise\_bypass\_cache
</div>

<CloudOnlyBadge />

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

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

仅在 ClickHouse Cloud 中生效。与 read\_from\_filesystem\_cache\_if\_exists\_otherwise\_bypass\_cache 相同，但作用于分布式缓存。

<div id="read_from_filesystem_cache_if_exists_otherwise_bypass_cache">
  ## read\_from\_filesystem\_cache\_if\_exists\_otherwise\_bypass\_cache
</div>

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

允许以被动模式使用文件系统缓存——利用现有缓存条目，但不再向缓存中写入新的条目。如果对高负载的临时查询启用此设置，而对短时实时查询保持禁用，就有助于避免高负载查询造成缓存抖动，并提升系统整体效率。

<div id="read_from_page_cache_if_exists_otherwise_bypass_cache">
  ## read\_from\_page\_cache\_if\_exists\_otherwise\_bypass\_cache
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "0"},{"label": "新增用户态页缓存"}]}]} />

以被动模式使用用户态页缓存，类似于 read\_from\_filesystem\_cache\_if\_exists\_otherwise\_bypass\_cache。
