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

# automatic_parallel_* session settings

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

## automatic\_parallel\_replicas\_max\_duplicated\_read\_ratio

Type

Float

Default

0.5

How much of a query's read volume may be read by every replica instead of being split between them, as a
fraction of the whole, before automatic parallel replicas declines the query.

Only the read parallel replicas coordinate is split; every other read of the same subtree runs on each
replica in full. Those reads take the same wall-clock time either way, so the cost-model comparison is blind
to them, but the cluster performs `max_parallel_replicas` times as much work for them. This setting is the
limit on that waste: at the default 0.5 a query whose coordinated read is less than half of what it reads
keeps running on one node, however the time comparison turns out.

Set to 1 to accept any amount of duplicated reading, which restores the behaviour of only comparing times.

## automatic\_parallel\_replicas\_min\_bytes\_per\_replica

Type

UInt64

Default

1048576

Threshold of bytes to read per replica to enable parallel replicas automatically (applies only when `automatic_parallel_replicas_mode`=1). 0 means no threshold.
The total number of bytes to read is estimated based on the collected statistics.

## automatic\_parallel\_replicas\_mode

Type

UInt64

Default

0

Enable automatic switching to execution with parallel replicas based on collected statistics. Requires `enable_parallel_replicas = 1`, `parallel_replicas_local_plan = 1` and providing `cluster_for_parallel_replicas`. With `enable_parallel_replicas = 2` parallel replicas are forced and the automatic mode is not applied.
0 - disabled, 1 - enabled, 2 - only statistics collection is enabled (switching to execution with parallel replicas is disabled).

## automatic\_parallel\_replicas\_remember\_boundary

Type

Bool

Default

1

Lets automatic parallel replicas remember, per query plan, where the replicas' share of the work ends, so that a
repeated query whose statistics decline parallel replicas is decided without building the plan with parallel
replicas.

Disable it to make every query pay the full cost of the decision, e.g. when benchmarking that cost.
