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

# max_number_* session settings

> ClickHouse session settings in the max_number_* 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).

## max\_number\_of\_partitions\_for\_independent\_aggregation

Type

UInt64

Default

128

Maximal number of partitions in table to apply independent aggregation per partition. Part of the cost heuristic of [allow\_aggregate\_partitions\_independently](https://clickhouse.com/docs/reference/settings/session-settings/allow.md#allow_aggregate_partitions_independently).

## max\_number\_of\_partitions\_for\_independent\_distinct

Type

UInt64

Default

128

Maximal number of partitions in table to apply independent `DISTINCT` per partition. Part of the cost heuristic of [allow\_distinct\_partitions\_independently](https://clickhouse.com/docs/reference/settings/session-settings/allow.md#allow_distinct_partitions_independently).

## max\_number\_of\_partitions\_for\_independent\_window

Type

UInt64

Default

128

Maximal number of partitions in table to apply independent evaluation of window functions per partition. Part of the cost heuristic of [allow\_window\_partitions\_independently](https://clickhouse.com/docs/reference/settings/session-settings/allow.md#allow_window_partitions_independently).
