prefer_column_name_to_alias
Enables or disables using the original column names instead of aliases in query expressions and clauses. It especially matters when alias is the same as the column name, see Expression Aliases. Enable this setting to make aliases syntax rules in ClickHouse more compatible with most other database engines. Possible values:- 0 — The column name is substituted with the alias.
- 1 — The column name is not substituted with the alias.
prefer_external_sort_block_bytes
Prefer maximum block bytes for external sort, reduce the memory usage during merging.prefer_global_in_and_join
Enables the replacement ofIN/JOIN operators with GLOBAL IN/GLOBAL JOIN.
Possible values:
- 0 — Disabled.
IN/JOINoperators are not replaced withGLOBAL IN/GLOBAL JOIN. - 1 — Enabled.
IN/JOINoperators are replaced withGLOBAL IN/GLOBAL JOIN.
SET distributed_product_mode=global can change the queries behavior for the distributed tables, it’s not suitable for local tables or tables from external resources. Here is when the prefer_global_in_and_join setting comes into play.
For example, we have query serving nodes that contain local tables, which are not suitable for distribution. We need to scatter their data on the fly during distributed processing with the GLOBAL keyword — GLOBAL IN/GLOBAL JOIN.
Another use case of prefer_global_in_and_join is accessing tables created by external engines. This setting helps to reduce the number of calls to external sources while joining such tables: only one call per query.
See also:
- Distributed subqueries for more information on how to use
GLOBAL IN/GLOBAL JOIN
prefer_localhost_replica
Enables/disables preferable using the localhost replica when processing distributed queries. Possible values:- 1 — ClickHouse always sends a query to the localhost replica if it exists.
- 0 — ClickHouse uses the balancing strategy specified by the load_balancing setting.
Disable this setting if you use max_parallel_replicas without parallel_replicas_custom_key.
If parallel_replicas_custom_key is set, disable this setting only if it’s used on a cluster with multiple shards containing multiple replicas.
If it’s used on a cluster with a single shard and multiple replicas, disabling this setting will have negative effects.