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

# totals_* 会话设置

> 属于 totals_* 生成组的 ClickHouse 会话设置。

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

## totals\_auto\_threshold

类型

Float

默认值

0.5

用于 `totals_mode = 'auto'` 的阈值。
参见“WITH TOTALS 修饰符”一节。

## totals\_mode

类型

TotalsMode

默认值

after\_having\_exclusive

指定在存在 HAVING 时，以及在设置了 max\_rows\_to\_group\_by 和 group\_by\_overflow\_mode = 'any' 时，如何计算 TOTALS。
请参见“WITH TOTALS 修饰符”一节。
