distributed_aggregation_memory_efficient
Is the memory-saving mode of distributed aggregation enabled.distributed_connections_pool_size
The maximum number of simultaneous connections with remote servers for distributed processing of all queries to a single Distributed table. We recommend setting a value no less than the number of servers in the cluster.distributed_foreground_insert
Aliases:insert_distributed_sync
Enables or disables synchronous data insertion into a Distributed table.
By default, when inserting data into a Distributed table, the ClickHouse server sends data to cluster nodes in background mode. When distributed_foreground_insert=1, the data is processed synchronously, and the INSERT operation succeeds only after all the data is saved on all shards (at least one replica for each shard if internal_replication is true).
Possible values:
0— Data is inserted in background mode.1— Data is inserted in synchronous mode.
1.
See Also
distributed_group_by_no_merge
Do not merge aggregation states from different servers for distributed query processing, you can use this in case it is for certain that there are different keys on different shards Possible values:0— Disabled (final query processing is done on the initiator node).1- Do not merge aggregation states from different servers for distributed query processing (query completely processed on the shard, initiator only proxy the data), can be used in case it is for certain that there are different keys on different shards.2- Same as1but appliesORDER BYandLIMIT(it is not possible when the query processed completely on the remote node, like fordistributed_group_by_no_merge=1) on the initiator (can be used for queries withORDER BYand/orLIMIT).
distributed_insert_skip_read_only_replicas
Enables skipping read-only replicas for INSERT queries into Distributed. Possible values:- 0 — INSERT was as usual, if it will go to read-only replica it will fail
- 1 — Initiator will skip read-only replicas before sending data to shards.
distributed_product_mode
Changes the behaviour of distributed subqueries. ClickHouse applies this setting when the query contains the product of distributed tables, i.e. when the query for a distributed table contains a non-GLOBAL subquery for the distributed table. Restrictions:- Only applied for IN and JOIN subqueries.
- Only if the FROM section uses a distributed table containing more than one shard.
- If the subquery concerns a distributed table containing more than one shard.
- Not used for a table-valued remote function.
deny— Default value. Prohibits using these types of subqueries (returns the “Double-distributed in/JOIN subqueries is denied” exception).local— Replaces the database and table in the subquery with local ones for the destination server (shard), leaving the normalIN/JOIN.global— Replaces theIN/JOINquery withGLOBAL IN/GLOBAL JOIN.allow— Allows the use of these types of subqueries.
distributed_push_down_limit
Enables or disables LIMIT applying on each shard separately. This will allow to avoid:- Sending extra rows over network;
- Processing rows behind the limit on the initiator.
distributed_push_down_limit changes query execution only if at least one of the conditions met:
- distributed_group_by_no_merge > 0.
- Query does not have
GROUP BY/DISTINCT/LIMIT BY, but it hasORDER BY/LIMIT. - Query has
GROUP BY/DISTINCT/LIMIT BYwithORDER BY/LIMITand:- optimize_skip_unused_shards is enabled.
- optimize_distributed_group_by_sharding_key is enabled.
- 0 — Disabled.
- 1 — Enabled.