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

# distributed_index_analysis_* 会话设置

> 属于自动生成的 distributed_index_analysis_* 组的 ClickHouse 会话设置。

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

## distributed\_index\_analysis

[Beta 版功能](https://clickhouse.com/docs/reference/settings/beta-and-experimental-features.md#beta-features)

类型

Bool

默认值

0

分布式索引分析将在各副本之间分布式执行。
这对共享存储以及 cluster 中海量数据的场景尤为有利。
使用来自 cluster\_for\_parallel\_replicas 的副本。

**另请参见**

* [distributed\_index\_analysis\_for\_non\_shared\_merge\_tree](https://clickhouse.com/docs/zh/reference/settings/session-settings/distributed-index-analysis.md#distributed_index_analysis_for_non_shared_merge_tree)
* [distributed\_index\_analysis\_min\_parts\_to\_activate](https://clickhouse.com/docs/zh/reference/settings/merge-tree-settings/distributed-index.md#distributed_index_analysis_min_parts_to_activate)
* [distributed\_index\_analysis\_min\_indexes\_bytes\_to\_activate](https://clickhouse.com/docs/zh/reference/settings/merge-tree-settings/distributed-index.md#distributed_index_analysis_min_indexes_bytes_to_activate)

## distributed\_index\_analysis\_for\_non\_shared\_merge\_tree

类型

Bool

默认值

0

即使是非 SharedMergeTree (仅 Cloud 提供的引擎) ，也启用分布式索引分析。

## distributed\_index\_analysis\_only\_on\_coordinator

类型

Bool

默认值

0

如果启用，分布式索引分析将仅在协调器上执行。
这样可以避免在谓词包含子查询时 (例如 `IN (SELECT ...)`) 生成 O(N^2) 个查询，
因为否则每个 follower 副本都会各自独立触发自己的分布式索引分析；
但如果子查询中使用了大型表，则会降低分布式索引分析的效率。
