> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-parallel-read-in-order-multi-part.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# join_runtime_* 会话设置

> ClickHouse 的 join_runtime_* 组会话设置。

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

## join\_runtime\_bloom\_filter\_bytes

<SettingsInfoBlock type="UInt64" default_value="524288" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.9"},{"label": "524288"},{"label": "JOIN 运行时过滤器成为 Production 层级功能。"}]}, {"id": "row-2","items": [{"label": "25.10"},{"label": "524288"},{"label": "新设置"}]}]} />

用作 JOIN 运行时过滤器的布隆过滤器大小 (以字节为单位)  (参见 enable\_join\_runtime\_filters 设置) 。

## join\_runtime\_bloom\_filter\_hash\_functions

<SettingsInfoBlock type="UInt64" default_value="3" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.9"},{"label": "3"},{"label": "JOIN 运行时过滤器成为 Production 层级功能。"}]}, {"id": "row-2","items": [{"label": "25.10"},{"label": "3"},{"label": "新设置"}]}]} />

用作 JOIN 运行时过滤器的布隆过滤器中的哈希函数数量 (参见 enable\_join\_runtime\_filters 设置) 。

## join\_runtime\_bloom\_filter\_max\_ratio\_of\_set\_bits

<SettingsInfoBlock type="Double" default_value="0.7" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.9"},{"label": "0.7"},{"label": "JOIN 运行时过滤器成为 Production 层级功能。"}]}, {"id": "row-2","items": [{"label": "26.1"},{"label": "0.7"},{"label": "新设置"}]}]} />

如果运行时布隆过滤器中的置位比例超过该比率，则会完全禁用该过滤器，以降低开销。

## join\_runtime\_filter\_blocks\_to\_skip\_before\_reenabling

<SettingsInfoBlock type="UInt64" default_value="30" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.9"},{"label": "30"},{"label": "JOIN 运行时过滤器成为 Production 层级功能。"}]}, {"id": "row-2","items": [{"label": "26.1"},{"label": "30"},{"label": "新设置"}]}]} />

在尝试动态重新启用先前因过滤比率不佳而被禁用的运行时过滤器之前，需要跳过的块数。

## join\_runtime\_filter\_exact\_values\_limit

<SettingsInfoBlock type="UInt64" default_value="10000" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.9"},{"label": "10000"},{"label": "JOIN 运行时过滤器成为 Production 层级功能。"}]}, {"id": "row-2","items": [{"label": "25.10"},{"label": "10000"},{"label": "新设置"}]}]} />

运行时过滤器中以原样形式存储在集合中的元素最大数量；超过此阈值时，将切换为布隆过滤器。

## join\_runtime\_filter\_from\_fixed\_hash\_table

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

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

当 hash join 的构建侧被转换为 FixedHashMap (参见 `enable_join_fixed_hash_table_conversion`) 时，直接将该哈希表用作运行时过滤器。

## join\_runtime\_filter\_min\_probe\_rows

<SettingsInfoBlock type="UInt64" default_value="1000" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.9"},{"label": "1000"},{"label": "JOIN 运行时过滤器已成为 Production tier 功能。"}]}, {"id": "row-2","items": [{"label": "26.8"},{"label": "1000"},{"label": "用于控制是否安装 JOIN 运行时过滤器的最小探测端规模的新增设置。此前没有限制，因此之前的值为 0，表示始终安装。"}]}]} />

如果在查询计划阶段，预计 JOIN 的探测端产生的行数不超过此数值，则不会创建 JOIN 运行时过滤器。对于很小的探测端，构建和应用运行时过滤器的开销大于其带来的节省。设置为 0 可始终创建运行时过滤器，而不考虑估计的探测端大小。

## join\_runtime\_filter\_pass\_ratio\_threshold\_for\_disabling

<SettingsInfoBlock type="Double" default_value="0.7" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.9"},{"label": "0.7"},{"label": "JOIN 运行时过滤器成为 Production 层级功能。"}]}, {"id": "row-2","items": [{"label": "26.1"},{"label": "0.7"},{"label": "新设置"}]}]} />

如果通过的行数与已检查行数的比率高于此阈值，则会认为运行时过滤器效果不佳，并在接下来的 `join_runtime_filter_blocks_to_skip_before_reenabling` 个块内将其禁用，以减少开销。

## join\_runtime\_filter\_size\_from\_hash\_table\_stats

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.7"},{"label": "1"},{"label": "使用从之前执行中收集的哈希表大小统计信息来确定 JOIN 运行时过滤器的大小。禁用后，将回退到固定的 `join_runtime_bloom_filter_bytes`。"}]}]} />

使用从之前执行中收集的哈希表大小统计信息来确定 JOIN 运行时过滤器的大小。禁用后，将回退到固定的 `join_runtime_bloom_filter_bytes`。
