Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

parallel_* session settings

These settings are available in system.settings and are autogenerated from source.

parallel_distributed_insert_select

Type
UInt64
Default
2
Version history
VersionDefault valueComment
25.72Enable parallel distributed insert select by default

Enables parallel distributed INSERT ... SELECT query.

If we execute INSERT INTO distributed_table_a SELECT ... FROM distributed_table_b queries and both tables use the same cluster, and both tables are either replicated or non-replicated, then this query is processed locally on every shard.

Possible values:

  • 0 — Disabled.
  • 1SELECT will be executed on each shard from the underlying table of the distributed engine.
  • 2SELECT and INSERT will be executed on each shard from/to the underlying table of the distributed engine.

Since v25.4, INSERT ... SELECT from a ReplicatedMergeTree or SharedMergeTree source can also be parallelized across replicas. To enable it:

  • parallel_distributed_insert_select = 2
  • enable_parallel_replicas = 1

parallel_hash_join_threshold

Type
UInt64
Default
100000
Version history
VersionDefault valueComment
25.5100000New setting
25.40New setting
25.30New setting

When hash-based join algorithm is applied, this threshold helps to decide between using hash and parallel_hash (only if estimation of the right table size is available). The former is used when we know that the right table size is below the threshold.

parallel_non_joined_rows_processing

Type
Bool
Default
1
Version history
VersionDefault valueComment
26.21New setting to enable parallel processing of non-joined rows in RIGHT/FULL parallel_hash joins.

Allow multiple threads to process non-joined rows from the right table in parallel during RIGHT and FULL JOINs. This can speed up the non-joined phase when using the parallel_hash join algorithm with large tables. When disabled, non-joined rows are processed by a single thread.

parallel_replica_offset

Beta feature
Type
UInt64
Default
0

This is internal setting that should not be used directly and represents an implementation detail of the ‘parallel replicas’ mode. This setting will be automatically set up by the initiator server for distributed queries to the index of the replica participating in query processing among parallel replicas.

parallel_view_processing

Type
Bool
Default
0

Enables pushing to attached views concurrently instead of sequentially.

Navigation