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

# min_* MergeTree 表设置

> 属于 min_* 分组的 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="min_absolute_delay_to_close">
  ## min\_absolute\_delay\_to\_close
</div>

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

在关闭、停止处理请求并且状态检查不再返回 Ok 之前的最小绝对延迟。

<div id="min_columns_to_activate_adaptive_write_buffer">
  ## min\_columns\_to\_activate\_adaptive\_write\_buffer
</div>

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

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

通过使用自适应写入缓冲区，可降低包含大量列的表的内存使用量。

可选值：

* 0 - 不受限制
* 1 - 始终启用

<div id="min_compress_block_size">
  ## min\_compress\_block\_size
</div>

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

写入下一个标记时，触发压缩所需的未压缩数据块的最小大小。你也可以在全局设置中指定此设置 (参见 [min\_compress\_block\_size](/docs/zh/reference/settings/merge-tree-settings/min#min_compress_block_size) 设置) 。创建表时指定的值会覆盖此设置的全局值。

<div id="min_index_granularity_bytes">
  ## min\_index\_granularity\_bytes
</div>

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

数据粒度的最小允许大小 (单位：字节) 。

用于防止因误操作创建
`index_granularity_bytes`
极低的表。

<div id="min_marks_to_honor_max_concurrent_queries">
  ## min\_marks\_to\_honor\_max\_concurrent\_queries
</div>

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

应用 [max\_concurrent\_queries](/docs/zh/reference/settings/merge-tree-settings/max#max_concurrent_queries)
设置时，查询至少需要读取的标记数。

<Note>
  查询仍会受到其他 `max_concurrent_queries` 设置的限制。
</Note>

可能的值：

* 正整数。
* `0` — 已禁用 (`max_concurrent_queries` 限制不应用于任何查询) 。

**示例**

```xml theme={null}
<min_marks_to_honor_max_concurrent_queries>10</min_marks_to_honor_max_concurrent_queries>
```

<div id="min_merge_bytes_to_use_direct_io">
  ## min\_merge\_bytes\_to\_use\_direct\_io
</div>

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

合并操作中，使用直接 I/O 访问存储磁盘所需的最小数据量。合并数据分区片段时，ClickHouse 会计算所有待合并数据的总存储量。如果该存储量超过
`min_merge_bytes_to_use_direct_io` 字节，ClickHouse 就会通过直接 I/O
接口 (`O_DIRECT` 选项) 从存储磁盘读取和写入数据。如果 `min_merge_bytes_to_use_direct_io = 0`，则会禁用直接 I/O。

<div id="min_parts_to_merge_at_once">
  ## min\_parts\_to\_merge\_at\_once
</div>

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

合并选择器一次可选中进行合并的最少数据分区片段数
(属于专家级设置；如果你不了解其作用，请不要更改) 。
0 - 已禁用。适用于 Simple 和 StochasticSimple 合并选择器。

<div id="min_replicated_logs_to_keep">
  ## min\_replicated\_logs\_to\_keep
</div>

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

即使这些记录已过时，也会在 ZooKeeper 日志中保留大约这么多条最新记录。它不会影响表的运行：仅用于在清理前诊断 ZooKeeper 日志。

可能的值：

* 任何正整数。
