> ## 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_* session settings

> ClickHouse session settings in the totals_* generated group.

These settings are available in [system.settings](https://clickhouse.com/docs/reference/system-tables/settings.md) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

## totals\_auto\_threshold

Type

Float

Default

0.5

The threshold for `totals_mode = 'auto'`.
See the section "WITH TOTALS modifier".

## totals\_mode

Type

TotalsMode

Default

after\_having\_exclusive

How to calculate TOTALS when HAVING is present, as well as when max\_rows\_to\_group\_by and group\_by\_overflow\_mode = 'any' are present.
See the section "WITH TOTALS modifier".
