DOCAPI-4197: Fixes and clarifications.

This commit is contained in:
BayoNet 2019-05-15 10:16:48 +03:00
parent 3cbc6cf11c
commit dfcd9ab9a5
3 changed files with 18 additions and 21 deletions

View File

@ -75,7 +75,7 @@ Using the 'any' value lets you run an approximation of GROUP BY. The quality of
## max_bytes_before_external_group_by {#settings-max_bytes_before_external_group_by}
Sets the maximum volume or RAM (in bytes) that can be used by [GROUP BY](../../query_language/select.md#select-group-by-clause) operation. If memory consumption is bigger than the value of this setting, ClickHouse dumps operation data to the storage disk and continues query processing.
Sets the maximum volume of RAM in bytes that can be used by the [GROUP BY](../../query_language/select.md#select-group-by-clause) operation. The setting is used to avoid the out of memory situations. If memory consumption is bigger than the value of this setting, ClickHouse dumps operation state to the storage disk and continues query processing.
Possible values:
@ -207,22 +207,22 @@ What to do when the amount of data exceeds one of the limits: 'throw' or 'break'
## max_rows_in_join {#settings-max_rows_in_join}
Limits number of rows in the hash table that is used when joining tables.
Limits the number of rows in the hash table that is used when joining tables.
This settings applies to [SELECT ... JOIN](../../query_language/select.md#select-join) operations and [Join engine](../table_engines/join.md) functioning.
This settings applies to [SELECT ... JOIN](../../query_language/select.md#select-join) operations and the [Join table engine](../table_engines/join.md) functioning.
ClickHouse can proceed with different actions when the limit is reached. Use the [join_overflow_mode](#settings-join_overflow_mode) settings to choose the action.
Possible values:
- Positive integer.
- 0 — Memory control is disabled.
- 0 — Rows control is disabled.
Default value: 0.
## max_bytes_in_join {#settings-max_bytes_in_join}
Limits number of bytes in the hash table that is used when joining tables.
Limits hash table size in bytes that is used when joining tables.
This settings applies to [SELECT ... JOIN](../../query_language/select.md#select-join) operations and the [Join table engine](../table_engines/join.md) functioning.
@ -253,7 +253,7 @@ Default value: `THROW`.
**See Also**
- [SELECT ... JOIN](../../query_language/select.md#select-join)
- [JOIN Clause](../../query_language/select.md#select-join)
- [Join engine](../table_engines/join.md)
[Original article](https://clickhouse.yandex/docs/en/operations/settings/query_complexity/) <!--hide-->

View File

@ -252,22 +252,19 @@ Sets default strictness for [JOIN clauses](../../query_language/select.md#select
## join_any_take_last_row {#settings-join_any_take_last_row}
Changes behavior of ClickHouse for join operations with `ANY` strictness.
Changes behavior of join operations with `ANY` strictness.
!!! note "Attention"
This setting applies only for the [Join](../table_engines/join.md) table engine.
Possible values:
- 0 — ClickHouse uses standard logic.
- 0 — If the right table has more than one matching row, only the first one found is joined.
- 1 — If the right table has more than one matching row, only the last one found is joined.
If the right table has several matching rows, only the first one found is joined.
Default value: 0.
- 1 — ClickHouse uses changed logic.
If the right table has several matching rows, only the last one found is joined.
**See also**
**See Also**
- [JOIN clause](../../query_language/select.md#select-join)
- [Join table engine](../table_engines/join.md)
@ -645,7 +642,7 @@ When sequential consistency is enabled, ClickHouse allows the client to execute
- [insert_quorum_timeout](#settings-insert_quorum_timeout)
## max_network_bytes {#settings-max_network_bytes}
Limits the data volume (in bytes) that should be received or transmitted over the network, when executing a query. This setting applies for every individual query.
Limits the data volume (in bytes) that should be received or transmitted over the network when executing a query. This setting applies for every individual query.
Possible values:
@ -661,13 +658,13 @@ Limits speed of data exchange over the network in bytes per second. This setting
Possible values:
- Positive integer.
- 0 — Control of the data speed is disabled.
- 0 — Bandwidth control is disabled.
Default value: 0.
## max_network_bandwidth_for_user {#settings-max_network_bandwidth_for_user}
Limits speed of data exchange over the network in bytes per second. This setting applies for all concurrently running queries which performed by a single user.
Limits speed of data exchange over the network in bytes per second. This setting applies for all concurrently running queries performed by a single user.
Possible values:

View File

@ -519,16 +519,16 @@ Each time a query is run with the same `JOIN`, the subquery is run again because
In some cases, it is more efficient to use `IN` instead of `JOIN`.
Among the various types of `JOIN`, the most efficient is `ANY LEFT JOIN`, then `ANY INNER JOIN`. The least efficient are `ALL LEFT JOIN` and `ALL INNER JOIN`.
If you need a `JOIN` for joining with dimension tables (these are relatively small tables that contain dimension properties, such as names for advertising campaigns), a `JOIN` might not be very convenient due to the bulky syntax and the fact that the right table is re-accessed for every query. For such cases, there is an "external dictionaries" feature that you should use instead of `JOIN`. For more information, see the section [External dictionaries](dicts/external_dicts.md).
If you need a `JOIN` for joining with dimension tables (these are relatively small tables that contain dimension properties, such as names for advertising campaigns), a `JOIN` might not be very convenient due to the fact that the right table is re-accessed for every query. For such cases, there is an "external dictionaries" feature that you should use instead of `JOIN`. For more information, see the section [External dictionaries](dicts/external_dicts.md).
**Memory limitations**
**Memory Limitations**
ClickHouse uses the [hash join](https://en.wikipedia.org/wiki/Hash_join) algorithm. ClickHouse takes the `<right_subquery>` and create a hash table for it in RAM. If you need to restrict join operation memory consumption use the following settings:
ClickHouse uses the [hash join](https://en.wikipedia.org/wiki/Hash_join) algorithm. ClickHouse takes the `<right_subquery>` and creates a hash table for it in RAM. If you need to restrict join operation memory consumption use the following settings:
- [max_rows_in_join](../operations/settings/query_complexity.md#settings-max_rows_in_join) — Limits number of rows in the hash table.
- [max_bytes_in_join](../operations/settings/query_complexity.md#settings-max_bytes_in_join) — Limits size of the hash table.
When one of these limits is reached, ClickHouse acts as the [join_overflow_mode](../operations/settings/query_complexity.md#settings-join_overflow_mode) setting instructs.
When any of these limits is reached, ClickHouse acts as the [join_overflow_mode](../operations/settings/query_complexity.md#settings-join_overflow_mode) setting instructs.
#### Processing of Empty or NULL Cells