From 534e199c43651507216f912f86dbc59510edcc6e Mon Sep 17 00:00:00 2001 From: Daria Mozhaeva Date: Wed, 30 Sep 2020 11:32:57 +0400 Subject: [PATCH] Edit and translate to Russian. --- .../settings.md | 8 +- docs/en/operations/settings/settings.md | 98 ++++---- docs/en/sql-reference/statements/system.md | 6 +- .../settings.md | 6 +- docs/ru/operations/settings/settings.md | 228 +++++++++++++----- 5 files changed, 228 insertions(+), 118 deletions(-) diff --git a/docs/en/operations/server-configuration-parameters/settings.md b/docs/en/operations/server-configuration-parameters/settings.md index c1ac1d0d92..d89f74f6bd 100644 --- a/docs/en/operations/server-configuration-parameters/settings.md +++ b/docs/en/operations/server-configuration-parameters/settings.md @@ -351,15 +351,15 @@ Keys for syslog: ## send\_crash\_reports {#server_configuration_parameters-logger} Settings for opt-in sending crash reports to the ClickHouse core developers team via [Sentry](https://sentry.io). -Enabling it, especially in pre-production environments, is greatly appreciated. +Enabling it, especially in pre-production environments, is highly appreciated. -The server will need an access to public Internet via IPv4 (at the time of writing IPv6 is not supported by Sentry) for this feature to be functioning properly. +The server will need access to the public Internet via IPv4 (at the time of writing IPv6 is not supported by Sentry) for this feature to be functioning properly. Keys: - `enabled` – Boolean flag to enable the feature, `false` by default. Set to `true` to allow sending crash reports. -- `endpoint` – You can override the Sentry endpoint URL for sending crash reports. It can be either separate Sentry account or your self-hosted Sentry instance. Use the [Sentry DSN](https://docs.sentry.io/error-reporting/quickstart/?platform=native#configure-the-sdk) syntax. -- `anonymize` - Avoid attaching the server hostname to crash report. +- `endpoint` – You can override the Sentry endpoint URL for sending crash reports. It can be either a separate Sentry account or your self-hosted Sentry instance. Use the [Sentry DSN](https://docs.sentry.io/error-reporting/quickstart/?platform=native#configure-the-sdk) syntax. +- `anonymize` - Avoid attaching the server hostname to the crash report. - `http_proxy` - Configure HTTP proxy for sending crash reports. - `debug` - Sets the Sentry client into debug mode. - `tmp_path` - Filesystem path for temporary crash report state. diff --git a/docs/en/operations/settings/settings.md b/docs/en/operations/settings/settings.md index 4995c04f71..ee7eb1fd6b 100644 --- a/docs/en/operations/settings/settings.md +++ b/docs/en/operations/settings/settings.md @@ -2,7 +2,7 @@ ## distributed\_product\_mode {#distributed-product-mode} -Changes the behavior of [distributed subqueries](../../sql-reference/operators/in.md). +Changes the behaviour of [distributed subqueries](../../sql-reference/operators/in.md). 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. @@ -42,7 +42,7 @@ Consider the following queries: If `enable_optimize_predicate_expression = 1`, then the execution time of these queries is equal because ClickHouse applies `WHERE` to the subquery when processing it. -If `enable_optimize_predicate_expression = 0`, then the execution time of the second query is much longer, because the `WHERE` clause applies to all the data after the subquery finishes. +If `enable_optimize_predicate_expression = 0`, then the execution time of the second query is much longer because the `WHERE` clause applies to all the data after the subquery finishes. ## fallback\_to\_stale\_replicas\_for\_distributed\_queries {#settings-fallback_to_stale_replicas_for_distributed_queries} @@ -215,7 +215,7 @@ Ok. ## input\_format\_values\_deduce\_templates\_of\_expressions {#settings-input_format_values_deduce_templates_of_expressions} -Enables or disables template deduction for SQL expressions in [Values](../../interfaces/formats.md#data-format-values) format. It allows parsing and interpreting expressions in `Values` much faster if expressions in consecutive rows have the same structure. ClickHouse tries to deduce template of an expression, parse the following rows using this template and evaluate the expression on a batch of successfully parsed rows. +Enables or disables template deduction for SQL expressions in [Values](../../interfaces/formats.md#data-format-values) format. It allows parsing and interpreting expressions in `Values` much faster if expressions in consecutive rows have the same structure. ClickHouse tries to deduce the template of an expression, parse the following rows using this template and evaluate the expression on a batch of successfully parsed rows. Possible values: @@ -236,7 +236,7 @@ INSERT INTO test VALUES (lower('Hello')), (lower('world')), (lower('INSERT')), ( ## input\_format\_values\_accurate\_types\_of\_literals {#settings-input-format-values-accurate-types-of-literals} -This setting is used only when `input_format_values_deduce_templates_of_expressions = 1`. It can happen, that expressions for some column have the same structure, but contain numeric literals of different types, e.g. +This setting is used only when `input_format_values_deduce_templates_of_expressions = 1`. Expressions for some column may have the same structure, but contain numeric literals of different types, e.g. ``` sql (..., abs(0), ...), -- UInt64 literal @@ -278,7 +278,7 @@ Disabled by default. ## input\_format\_null\_as\_default {#settings-input-format-null-as-default} -Enables or disables using default values if input data contain `NULL`, but data type of the corresponding column in not `Nullable(T)` (for text input formats). +Enables or disables using default values if input data contain `NULL`, but the data type of the corresponding column in not `Nullable(T)` (for text input formats). ## input\_format\_skip\_unknown\_fields {#settings-input-format-skip-unknown-fields} @@ -395,7 +395,7 @@ See also: ## join\_use\_nulls {#join_use_nulls} -Sets the type of [JOIN](../../sql-reference/statements/select/join.md) behavior. When merging tables, empty cells may appear. ClickHouse fills them differently based on this setting. +Sets the type of [JOIN](../../sql-reference/statements/select/join.md) behaviour. When merging tables, empty cells may appear. ClickHouse fills them differently based on this setting. Possible values: @@ -424,8 +424,8 @@ Limits sizes of right-hand join data blocks in partial merge join algorithm for ClickHouse server: 1. Splits right-hand join data into blocks with up to the specified number of rows. -2. Indexes each block with their minimum and maximum values -3. Unloads prepared blocks to disk if possible. +2. Indexes each block with its minimum and maximum values. +3. Unloads prepared blocks to disk if it is possible. Possible values: @@ -447,25 +447,25 @@ Default value: 64. ## any\_join\_distinct\_right\_table\_keys {#any_join_distinct_right_table_keys} -Enables legacy ClickHouse server behavior in `ANY INNER|LEFT JOIN` operations. +Enables legacy ClickHouse server behaviour in `ANY INNER|LEFT JOIN` operations. !!! note "Warning" - Use this setting only for the purpose of backward compatibility if your use cases depend on legacy `JOIN` behavior. + Use this setting only for backward compatibility if your use cases depend on legacy `JOIN` behaviour. -When the legacy behavior enabled: +When the legacy behaviour enabled: - Results of `t1 ANY LEFT JOIN t2` and `t2 ANY RIGHT JOIN t1` operations are not equal because ClickHouse uses the logic with many-to-one left-to-right table keys mapping. - Results of `ANY INNER JOIN` operations contain all rows from the left table like the `SEMI LEFT JOIN` operations do. -When the legacy behavior disabled: +When the legacy behaviour disabled: - Results of `t1 ANY LEFT JOIN t2` and `t2 ANY RIGHT JOIN t1` operations are equal because ClickHouse uses the logic which provides one-to-many keys mapping in `ANY RIGHT JOIN` operations. -- Results of `ANY INNER JOIN` operations contain one row per key from both left and right tables. +- Results of `ANY INNER JOIN` operations contain one row per key from both the left and right tables. Possible values: -- 0 — Legacy behavior is disabled. -- 1 — Legacy behavior is enabled. +- 0 — Legacy behaviour is disabled. +- 1 — Legacy behaviour is enabled. Default value: 0. @@ -634,7 +634,7 @@ Possible values: Default value: `QUERY_START`. -Can be used to limit which entiries will goes to `query_log`, say you are interesting only in errors, then you can use `EXCEPTION_WHILE_PROCESSING`: +Can be used to limit which entities will go to `query_log`, say you are interested only in errors, then you can use `EXCEPTION_WHILE_PROCESSING`: ``` text log_queries_min_type='EXCEPTION_WHILE_PROCESSING' @@ -662,11 +662,11 @@ The setting also doesn’t have a purpose when using INSERT SELECT, since data i Default value: 1,048,576. -The default is slightly more than `max_block_size`. The reason for this is because certain table engines (`*MergeTree`) form a data part on the disk for each inserted block, which is a fairly large entity. Similarly, `*MergeTree` tables sort data during insertion and a large enough block size allow sorting more data in RAM. +The default is slightly more than `max_block_size`. The reason for this is because certain table engines (`*MergeTree`) form a data part on the disk for each inserted block, which is a fairly large entity. Similarly, `*MergeTree` tables sort data during insertion, and a large enough block size allow sorting more data in RAM. ## min\_insert\_block\_size\_rows {#min-insert-block-size-rows} -Sets minimum number of rows in block which can be inserted into a table by an `INSERT` query. Smaller-sized blocks are squashed into bigger ones. +Sets the minimum number of rows in the block which can be inserted into a table by an `INSERT` query. Smaller-sized blocks are squashed into bigger ones. Possible values: @@ -677,7 +677,7 @@ Default value: 1048576. ## min\_insert\_block\_size\_bytes {#min-insert-block-size-bytes} -Sets minimum number of bytes in block which can be inserted into a table by an `INSERT` query. Smaller-sized blocks are squashed into bigger ones. +Sets the minimum number of bytes in the block which can be inserted into a table by an `INSERT` query. Smaller-sized blocks are squashed into bigger ones. Possible values: @@ -754,7 +754,7 @@ Default value: 256 KiB. ## max\_parser\_depth {#max_parser_depth} -Limits maximum recursion depth in the recursive descent parser. Allows to control stack size. +Limits maximum recursion depth in the recursive descent parser. Allows controlling the stack size. Possible values: @@ -865,12 +865,12 @@ Yandex.Metrica uses this parameter set to 1 for implementing suggestions for seg ## replace\_running\_query\_max\_wait\_ms {#replace-running-query-max-wait-ms} -The wait time for running query with the same `query_id` to finish, when the [replace_running_query](#replace-running-query) setting is active. +The wait time for running the query with the same `query_id` to finish, when the [replace_running_query](#replace-running-query) setting is active. Possible values: - Positive integer. -- 0 — Throwing an exception that does not allow to run a new query if the server already executes a query with the same `query_id`. +- 0 — Throwing an exception that does not allow to run a new query if the server already executes a query with the same `query_id`. Default value: 5000. @@ -946,7 +946,7 @@ The `first_or_random` algorithm solves the problem of the `in_order` algorithm. load_balancing = round_robin ``` -This algorithm uses round robin policy across replicas with the same number of errors (only the queries with `round_robin` policy is accounted). +This algorithm uses a round-robin policy across replicas with the same number of errors (only the queries with `round_robin` policy is accounted). ## prefer\_localhost\_replica {#settings-prefer-localhost-replica} @@ -983,7 +983,7 @@ Replica lag is not controlled. Enable compilation of queries. By default, 0 (disabled). The compilation is only used for part of the query-processing pipeline: for the first stage of aggregation (GROUP BY). -If this portion of the pipeline was compiled, the query may run faster due to deployment of short cycles and inlining aggregate function calls. The maximum performance improvement (up to four times faster in rare cases) is seen for queries with multiple simple aggregate functions. Typically, the performance gain is insignificant. In very rare cases, it may slow down query execution. +If this portion of the pipeline was compiled, the query may run faster due to the deployment of short cycles and inlining aggregate function calls. The maximum performance improvement (up to four times faster in rare cases) is seen for queries with multiple simple aggregate functions. Typically, the performance gain is insignificant. In very rare cases, it may slow down query execution. ## min\_count\_to\_compile {#min-count-to-compile} @@ -1099,7 +1099,7 @@ When `output_format_json_quote_denormals = 1`, the query returns: ## format\_csv\_delimiter {#settings-format_csv_delimiter} -The character interpreted as a delimiter in the CSV data. By default, the delimiter is `,`. +The character is interpreted as a delimiter in the CSV data. By default, the delimiter is `,`. ## input\_format\_csv\_unquoted\_null\_literal\_as\_null {#settings-input_format_csv_unquoted_null_literal_as_null} @@ -1142,7 +1142,7 @@ See also: ## insert\_quorum\_timeout {#settings-insert_quorum_timeout} -Write to quorum timeout in seconds. If the timeout has passed and no write has taken place yet, ClickHouse will generate an exception and the client must repeat the query to write the same block to the same or any other replica. +Write to a quorum timeout in seconds. If the timeout has passed and no write has taken place yet, ClickHouse will generate an exception and the client must repeat the query to write the same block to the same or any other replica. Default value: 60 seconds. @@ -1198,8 +1198,8 @@ Default value: 0. Usage By default, deduplication is not performed for materialized views but is done upstream, in the source table. -If an INSERTed block is skipped due to deduplication in the source table, there will be no insertion into attached materialized views. This behaviour exists to enable insertion of highly aggregated data into materialized views, for cases where inserted blocks are the same after materialized view aggregation but derived from different INSERTs into the source table. -At the same time, this behaviour “breaks” `INSERT` idempotency. If an `INSERT` into the main table was successful and `INSERT` into a materialized view failed (e.g. because of communication failure with Zookeeper) a client will get an error and can retry the operation. However, the materialized view won’t receive the second insert because it will be discarded by deduplication in the main (source) table. The setting `deduplicate_blocks_in_dependent_materialized_views` allows for changing this behaviour. On retry, a materialized view will receive the repeat insert and will perform deduplication check by itself, +If an INSERTed block is skipped due to deduplication in the source table, there will be no insertion into attached materialized views. This behaviour exists to enable the insertion of highly aggregated data into materialized views, for cases where inserted blocks are the same after materialized view aggregation but derived from different INSERTs into the source table. +At the same time, this behaviour “breaks” `INSERT` idempotency. If an `INSERT` into the main table was successful and `INSERT` into a materialized view failed (e.g. because of communication failure with Zookeeper) a client will get an error and can retry the operation. However, the materialized view won’t receive the second insert because it will be discarded by deduplication in the main (source) table. The setting `deduplicate_blocks_in_dependent_materialized_views` allows for changing this behaviour. On retry, a materialized view will receive the repeat insert and will perform a deduplication check by itself, ignoring check result for the source table, and will insert rows lost because of the first failure. ## max\_network\_bytes {#settings-max-network-bytes} @@ -1355,7 +1355,7 @@ Default value: 0. - Type: seconds - Default value: 60 seconds -Controls how fast errors in distributed tables are zeroed. If a replica is unavailable for some time, accumulates 5 errors, and distributed\_replica\_error\_half\_life is set to 1 second, then the replica is considered normal 3 seconds after last error. +Controls how fast errors in distributed tables are zeroed. If a replica is unavailable for some time, accumulates 5 errors, and distributed\_replica\_error\_half\_life is set to 1 second, then the replica is considered normal 3 seconds after the last error. See also: @@ -1369,7 +1369,7 @@ See also: - Type: unsigned int - Default value: 1000 -Error count of each replica is capped at this value, preventing a single replica from accumulating too many errors. +The error count of each replica is capped at this value, preventing a single replica from accumulating too many errors. See also: @@ -1383,7 +1383,7 @@ See also: - Type: unsigned int - Default value: 0 -Number of errors that will be ignored while choosing replicas (according to `load_balancing` algorithm). +The number of errors that will be ignored while choosing replicas (according to `load_balancing` algorithm). See also: @@ -1414,7 +1414,7 @@ Default value: 30000 milliseconds (30 seconds). ## distributed\_directory\_monitor\_batch\_inserts {#distributed_directory_monitor_batch_inserts} -Enables/disables sending of inserted data in batches. +Enables/disables inserted data sending in batches. When batch sending is enabled, the [Distributed](../../engines/table-engines/special/distributed.md) table engine tries to send multiple files of inserted data in one operation instead of sending them separately. Batch sending improves cluster performance by better-utilizing server and network resources. @@ -1507,7 +1507,7 @@ Default value: 0. - Type: bool - Default value: True -Enable order-preserving parallel parsing of data formats. Supported only for TSV, TKSV, CSV and JSONEachRow formats. +Enable order-preserving parallel parsing of data formats. Supported only for TSV, TKSV, CSV, and JSONEachRow formats. ## min\_chunk\_bytes\_for\_parallel\_parsing {#min-chunk-bytes-for-parallel-parsing} @@ -1559,7 +1559,7 @@ Default value: 0. ## background\_pool\_size {#background_pool_size} -Sets the number of threads performing background operations in table engines (for example, merges in [MergeTree engine](../../engines/table-engines/mergetree-family/index.md) tables). This setting is applied from `default` profile at ClickHouse server start and can’t be changed in a user session. By adjusting this setting, you manage CPU and disk load. Smaller pool size utilizes less CPU and disk resources, but background processes advance slower which might eventually impact query performance. +Sets the number of threads performing background operations in table engines (for example, merges in [MergeTree engine](../../engines/table-engines/mergetree-family/index.md) tables). This setting is applied from the `default` profile at the ClickHouse server start and can’t be changed in a user session. By adjusting this setting, you manage CPU and disk load. Smaller pool size utilizes less CPU and disk resources, but background processes advance slower which might eventually impact query performance. Before changing it, please also take a look at related [MergeTree settings](../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-merge_tree), such as `number_of_free_entries_in_pool_to_lower_max_size_of_merge` and `number_of_free_entries_in_pool_to_execute_mutation`. @@ -1578,8 +1578,8 @@ If we execute `INSERT INTO distributed_table_a SELECT ... FROM distributed_table Possible values: - 0 — Disabled. -- 1 — `SELECT` will be executed on each shard from underlying table of the distributed engine. -- 2 — `SELECT` and `INSERT` will be executed on each shard from/to underlying table of the distributed engine. +- 1 — `SELECT` will be executed on each shard from the underlying table of the distributed engine. +- 2 — `SELECT` and `INSERT` will be executed on each shard from/to the underlying table of the distributed engine. Default value: 0. @@ -1602,7 +1602,7 @@ Default value: `0`. - [Managing Distributed Tables](../../sql-reference/statements/system.md#query-language-system-distributed) ## background\_buffer\_flush\_schedule\_pool\_size {#background_buffer_flush_schedule_pool_size} -Sets the number of threads performing background flush in [Buffer](../../engines/table-engines/special/buffer.md)-engine tables. This setting is applied at ClickHouse server start and can’t be changed in a user session. +Sets the number of threads performing background flush in [Buffer](../../engines/table-engines/special/buffer.md)-engine tables. This setting is applied at the ClickHouse server start and can’t be changed in a user session. Possible values: @@ -1612,7 +1612,7 @@ Default value: 16. ## background\_move\_pool\_size {#background_move_pool_size} -Sets the number of threads performing background moves of data parts for [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-multiple-volumes)-engine tables. This setting is applied at ClickHouse server start and can’t be changed in a user session. +Sets the number of threads performing background moves of data parts for [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-multiple-volumes)-engine tables. This setting is applied at the ClickHouse server start and can’t be changed in a user session. Possible values: @@ -1634,7 +1634,7 @@ Default value: 16. Prohibits data parts merging in [Replicated\*MergeTree](../../engines/table-engines/mergetree-family/replication.md)-engine tables. -When merging is prohibited, the replica never merges parts and always downloads merged parts from other replicas. If there is no required data yet, the replica waits for it. CPU and disk load on the replica server decreases, but the network load on cluster increases. This setting can be useful on servers with relatively weak CPUs or slow disks, such as servers for backups storage. +When merging is prohibited, the replica never merges parts and always downloads merged parts from other replicas. If there is no required data yet, the replica waits for it. CPU and disk load on the replica server decreases, but the network load on the cluster increases. This setting can be useful on servers with relatively weak CPUs or slow disks, such as servers for backups storage. Possible values: @@ -1649,7 +1649,7 @@ Default value: 0. ## background\_distributed\_schedule\_pool\_size {#background_distributed_schedule_pool_size} -Sets the number of threads performing background tasks for [distributed](../../engines/table-engines/special/distributed.md) sends. This setting is applied at ClickHouse server start and can’t be changed in a user session. +Sets the number of threads performing background tasks for [distributed](../../engines/table-engines/special/distributed.md) sends. This setting is applied at the ClickHouse server start and can’t be changed in a user session. Possible values: @@ -1740,7 +1740,7 @@ Default value: 8192. Turns on or turns off using of single dictionary for the data part. -By default, ClickHouse server monitors the size of dictionaries and if a dictionary overflows then the server starts to write the next one. To prohibit creating several dictionaries set `low_cardinality_use_single_dictionary_for_part = 1`. +By default, the ClickHouse server monitors the size of dictionaries and if a dictionary overflows then the server starts to write the next one. To prohibit creating several dictionaries set `low_cardinality_use_single_dictionary_for_part = 1`. Possible values: @@ -1785,7 +1785,7 @@ Default value: 0. ## min\_insert\_block\_size\_rows\_for\_materialized\_views {#min-insert-block-size-rows-for-materialized-views} -Sets minimum number of rows in block which can be inserted into a table by an `INSERT` query. Smaller-sized blocks are squashed into bigger ones. This setting is applied only for blocks inserted into [materialized view](../../sql-reference/statements/create/view.md). By adjusting this setting, you control blocks squashing while pushing to materialized view and avoid excessive memory usage. +Sets the minimum number of rows in the block which can be inserted into a table by an `INSERT` query. Smaller-sized blocks are squashed into bigger ones. This setting is applied only for blocks inserted into [materialized view](../../sql-reference/statements/create/view.md). By adjusting this setting, you control blocks squashing while pushing to materialized view and avoid excessive memory usage. Possible values: @@ -1800,7 +1800,7 @@ Default value: 1048576. ## min\_insert\_block\_size\_bytes\_for\_materialized\_views {#min-insert-block-size-bytes-for-materialized-views} -Sets minimum number of bytes in block which can be inserted into a table by an `INSERT` query. Smaller-sized blocks are squashed into bigger ones. This setting is applied only for blocks inserted into [materialized view](../../sql-reference/statements/create/view.md). By adjusting this setting, you control blocks squashing while pushing to materialized view and avoid excessive memory usage. +Sets the minimum number of bytes in the block which can be inserted into a table by an `INSERT` query. Smaller-sized blocks are squashed into bigger ones. This setting is applied only for blocks inserted into [materialized view](../../sql-reference/statements/create/view.md). By adjusting this setting, you control blocks squashing while pushing to materialized view and avoid excessive memory usage. Possible values: @@ -1815,7 +1815,7 @@ Default value: 268435456. ## output\_format\_pretty\_grid\_charset {#output-format-pretty-grid-charset} -Allows to change a charset which is used for printing grids borders. Available charsets are following: UTF-8, ASCII. +Allows changing a charset which is used for printing grids borders. Available charsets are UTF-8, ASCII. **Example** @@ -1872,12 +1872,12 @@ When `ttl_only_drop_parts` is disabled (by default), the ClickHouse server only When `ttl_only_drop_parts` is enabled, the ClickHouse server drops a whole part when all rows in it are expired. -Dropping whole parts instead of partial cleaning TTL-d rows allows to have shorter `merge_with_ttl_timeout` times and lower impact on system performance. +Dropping whole parts instead of partial cleaning TTL-d rows allows having shorter `merge_with_ttl_timeout` times and lower impact on system performance. Possible values: -- 0 — Complete dropping of data parts is disabled. -- 1 — Complete dropping of data parts is enabled. +- 0 — The complete dropping of data parts is disabled. +- 1 — The complete dropping of data parts is enabled. Default value: `0`. @@ -1888,9 +1888,9 @@ Default value: `0`. ## lock_acquire_timeout {#lock_acquire_timeout} -Defines how many seconds locking request waits before failing. +Defines how many seconds a locking request waits before failing. -Locking timeout is used to protect from deadlocks while executing read/write operations with tables. When timeout expires and locking request fails, the ClickHouse server throws an exeption "Locking attempt timed out! Possible deadlock avoided. Client should retry." with error code `DEADLOCK_AVOIDED`. +Locking timeout is used to protect from deadlocks while executing read/write operations with tables. When the timeout expires and the locking request fails, the ClickHouse server throws an exception "Locking attempt timed out! Possible deadlock avoided. Client should retry." with error code `DEADLOCK_AVOIDED`. Possible values: diff --git a/docs/en/sql-reference/statements/system.md b/docs/en/sql-reference/statements/system.md index f6ff264e82..a9f9b718de 100644 --- a/docs/en/sql-reference/statements/system.md +++ b/docs/en/sql-reference/statements/system.md @@ -81,12 +81,12 @@ SYSTEM DROP REPLICA 'replica_name'; SYSTEM DROP REPLICA 'replica_name' FROM ZKPATH '/path/to/table/in/zk'; ``` -Queries will remove the replica path in ZooKeeper. It’s useful when replica is dead and its metadata cannot be removed from ZooKeeper by `DROP TABLE` because there is no such table anymore. It will only drop the inactive/stale replica, and it can’t drop local replica, please use `DROP TABLE` for that. `DROP REPLICA` does not drop any tables and does not remove any data or metadata from disk. +Queries will remove the replica path in ZooKeeper. It is useful when the replica is dead and its metadata cannot be removed from ZooKeeper by `DROP TABLE` because there is no such table anymore. It will only drop the inactive/stale replica, and it cannot drop local replica, please use `DROP TABLE` for that. `DROP REPLICA` does not drop any tables and does not remove any data or metadata from disk. The first one removes metadata of `'replica_name'` replica of `database.table` table. The second one does the same for all replicated tables in the database. -The third one does the same for all replicated tables on local server. -The forth one is useful to remove metadata of dead replica when all other replicas of a table were dropped. It requires the table path to be specified explicitly. It must be the same path as was passed to the first argument of `ReplicatedMergeTree` engine on table creation. +The third one does the same for all replicated tables on the local server. +The fourth one is useful to remove metadata of dead replica when all other replicas of a table were dropped. It requires the table path to be specified explicitly. It must be the same path as was passed to the first argument of `ReplicatedMergeTree` engine on table creation. ## DROP UNCOMPRESSED CACHE {#query_language-system-drop-uncompressed-cache} diff --git a/docs/ru/operations/server-configuration-parameters/settings.md b/docs/ru/operations/server-configuration-parameters/settings.md index 795a9f5893..0abb568ffc 100644 --- a/docs/ru/operations/server-configuration-parameters/settings.md +++ b/docs/ru/operations/server-configuration-parameters/settings.md @@ -492,11 +492,11 @@ ClickHouse проверяет условия для `min_part_size` и `min_part ## max\_thread\_pool\_size {#max-thread-pool-size} -Максимальное кол-во потоков в глобальном пуле потоков. +Максимальное количество потоков в глобальном пуле потоков. -Default value: 10000. +Значение по умолчанию: 10000. -**Example** +**Пример** ``` xml 12000 diff --git a/docs/ru/operations/settings/settings.md b/docs/ru/operations/settings/settings.md index 9a487b6c16..15c4139a3f 100644 --- a/docs/ru/operations/settings/settings.md +++ b/docs/ru/operations/settings/settings.md @@ -281,6 +281,14 @@ INSERT INTO test VALUES (lower('Hello')), (lower('world')), (lower('INSERT')), ( Значение по умолчанию: 1. +## input\_format\_tsv\_empty\_as\_default {#settings-input-format-tsv-empty-as-default} + +Если эта настройка включена, замените пустые поля ввода в TSV значениями по умолчанию. Для сложных выражений по умолчанию также должна быть включена настройка `input_format_defaults_for_omitted_fields`. + +По умолчанию отключена. + +Disabled by default. + ## input\_format\_null\_as\_default {#settings-input-format-null-as-default} Включает или отключает использование значений по умолчанию в случаях, когда во входных данных содержится `NULL`, но тип соответствующего столбца не `Nullable(T)` (для текстовых форматов). @@ -369,7 +377,7 @@ INSERT INTO test VALUES (lower('Hello')), (lower('world')), (lower('INSERT')), ( Устанавливает строгость по умолчанию для [JOIN](../../sql-reference/statements/select/join.md#select-join). -Возможные значения +Возможные значения: - `ALL` — если в правой таблице несколько совпадающих строк, данные умножаются на количество этих строк. Это нормальное поведение `JOIN` как в стандартном SQL. - `ANY` — если в правой таблице несколько соответствующих строк, то соединяется только первая найденная. Если в «правой» таблице есть не более одной подходящей строки, то результаты `ANY` и `ALL` совпадают. @@ -520,52 +528,41 @@ ClickHouse использует этот параметр при чтении д Значение по умолчанию: 0. -## log\_queries {#settings-log-queries} +## network_compression_method {#network_compression_method} -Установка логирования запроса. +Устанавливает метод сжатия данных, который используется для обмена данными между серверами и между сервером и [clickhouse-client](../../interfaces/cli.md). -Запросы, переданные в ClickHouse с этой установкой, логируются согласно правилам конфигурационного параметра сервера [query\_log](../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-query-log). +Возможные значения: -Пример: +- `LZ4` — устанавливает метод сжатия LZ4. +- `ZSTD` — устанавливает метод сжатия ZSTD. -``` text -log_queries=1 -``` +Значение по умолчанию: `LZ4`. -## log\_queries\_min\_type {#settings-log-queries-min-type} +**См. также** -`query_log` минимальный уровень логирования. +- [network_zstd_compression_level](#network_zstd_compression_level) -Возможные значения: -- `QUERY_START` (`=1`) -- `QUERY_FINISH` (`=2`) -- `EXCEPTION_BEFORE_START` (`=3`) -- `EXCEPTION_WHILE_PROCESSING` (`=4`) +## network_zstd_compression_level {#network_zstd_compression_level} -Значение по умолчанию: `QUERY_START`. +Регулирует уровень сжатия ZSTD. Используется только тогда, когда [network_compression_method](#network_compression_method) установлен на `ZSTD`. -Можно использовать для ограничения того, какие объекты будут записаны в `query_log`, например, если вас интересуют ошибки, тогда вы можете использовать `EXCEPTION_WHILE_PROCESSING`: +Возможные значения: -``` text -log_queries_min_type='EXCEPTION_WHILE_PROCESSING' -``` +- Положительное целое число от 1 до 15. -## log\_queries\_min\_type {#settings-log-queries-min-type} +Значение по умолчанию: `1`. -`query_log` минимальный уровень логирования. +## log\_queries {#settings-log-queries} -Возможные значения: -- `QUERY_START` (`=1`) -- `QUERY_FINISH` (`=2`) -- `EXCEPTION_BEFORE_START` (`=3`) -- `EXCEPTION_WHILE_PROCESSING` (`=4`) +Установка логирования запроса. -Значение по умолчанию: `QUERY_START`. +Запросы, переданные в ClickHouse с этой установкой, логируются согласно правилам конфигурационного параметра сервера [query\_log](../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-query-log). -Можно использовать для ограничения того, какие объекты будут записаны в `query_log`, например, если вас интересуют ошибки, тогда вы можете использовать `EXCEPTION_WHILE_PROCESSING`: +Пример: ``` text -log_queries_min_type='EXCEPTION_WHILE_PROCESSING' +log_queries=1 ``` ## log\_queries\_min\_type {#settings-log-queries-min-type} @@ -839,6 +836,11 @@ ClickHouse поддерживает следующие алгоритмы выб - [Nearest hostname](#load_balancing-nearest_hostname) - [In order](#load_balancing-in_order) - [First or random](#load_balancing-first_or_random) +- [Round robin](#load_balancing-round_robin) + +См. также: + +- [distributed\_replica\_max\_ignored\_errors](#settings-distributed_replica_max_ignored_errors) ### Random (by Default) {#load_balancing-random} @@ -882,6 +884,14 @@ load_balancing = first_or_random Алгоритм `first or random` решает проблему алгоритма `in order`. При использовании `in order`, если одна реплика перестаёт отвечать, то следующая за ней принимает двойную нагрузку, в то время как все остальные обрабатываю свой обычный трафик. Алгоритм `first or random` равномерно распределяет нагрузку между репликами. +### Round Robin {#load_balancing-round_robin} + +``` sql +load_balancing = round_robin +``` + +Этот алгоритм использует циклический перебор реплик с одинаковым количеством ошибок (учитываются только запросы с алгоритмом `round_robin`). + ## prefer\_localhost\_replica {#settings-prefer-localhost-replica} Включает или выключает предпочтительное использование localhost реплики при обработке распределенных запросов. @@ -1292,6 +1302,48 @@ ClickHouse генерирует исключение Значение по умолчанию: 0. +## distributed\_replica\_error\_half\_life {#settings-distributed_replica_error_half_life} + +- Тип: секунды +- Значение по умолчанию: 60 секунд + +Управляет скоростью обнуления ошибок в распределенных таблицах. Если реплика недоступна в течение некоторого времени, накапливает 5 ошибок, а distributed\_replica\_error\_half\_life установлена на 1 секунду, то реплика считается нормальной через 3 секунды после последней ошибки. + +См. также: + +- [load\_balancing](#load_balancing-round_robin) +- [Table engine Distributed](../../engines/table-engines/special/distributed.md) +- [distributed\_replica\_error\_cap](#settings-distributed_replica_error_cap) +- [distributed\_replica\_max\_ignored\_errors](#settings-distributed_replica_max_ignored_errors) + +## distributed\_replica\_error\_cap {#settings-distributed_replica_error_cap} + +- Тип: unsigned int +- Значение по умолчанию: 1000 + +Счетчик ошибок каждой реплики ограничен этим значением, чтобы одна реплика не накапливала слишком много ошибок. + +См. также: + +- [load\_balancing](#load_balancing-round_robin) +- [Table engine Distributed](../../engines/table-engines/special/distributed.md) +- [distributed\_replica\_error\_half\_life](#settings-distributed_replica_error_half_life) +- [distributed\_replica\_max\_ignored\_errors](#settings-distributed_replica_max_ignored_errors) + +## distributed\_replica\_max\_ignored\_errors {#settings-distributed_replica_max_ignored_errors} + +- Тип: unsigned int +- Значение по умолчанию: 0 + +Количество ошибок, которые будут проигнорированы при выборе реплик (согласно алгоритму `load_balancing`). + +См. также: + +- [load\_balancing](#load_balancing-round_robin) +- [Table engine Distributed](../../engines/table-engines/special/distributed.md) +- [distributed\_replica\_error\_cap](#settings-distributed_replica_error_cap) +- [distributed\_replica\_error\_half\_life](#settings-distributed_replica_error_half_life) + ## distributed\_directory\_monitor\_sleep\_time\_ms {#distributed_directory_monitor_sleep_time_ms} Основной интервал отправки данных движком таблиц [Distributed](../../engines/table-engines/special/distributed.md). Фактический интервал растёт экспоненциально при возникновении ошибок. @@ -1342,65 +1394,103 @@ ClickHouse генерирует исключение ## query\_profiler\_real\_time\_period\_ns {#query_profiler_real_time_period_ns} -Sets the period for a real clock timer of the [query profiler](../../operations/optimizing-performance/sampling-query-profiler.md). Real clock timer counts wall-clock time. +Устанавливает период для таймера реального времени [профилировщика запросов](../../operations/optimizing-performance/sampling-query-profiler.md). Таймер реального времени считает wall-clock time. -Possible values: +Возможные значения: -- Positive integer number, in nanoseconds. +- Положительное целое число в наносекундах. - Recommended values: + Рекомендуемые значения: - - 10000000 (100 times a second) nanoseconds and less for single queries. - - 1000000000 (once a second) for cluster-wide profiling. + - 10000000 (100 раз в секунду) наносекунд и меньшее значение для одиночных запросов. + - 1000000000 (раз в секунду) для профилирования в масштабе кластера. -- 0 for turning off the timer. +- 0 для выключения таймера. -Type: [UInt64](../../sql-reference/data-types/int-uint.md). +Тип: [UInt64](../../sql-reference/data-types/int-uint.md). -Default value: 1000000000 nanoseconds (once a second). +Значение по умолчанию: 1000000000 наносекунд (раз в секунду). -See also: +См. также: -- System table [trace\_log](../../operations/system-tables/trace_log.md#system_tables-trace_log) +- Системная таблица [trace\_log](../../operations/system-tables/trace_log.md#system_tables-trace_log) ## query\_profiler\_cpu\_time\_period\_ns {#query_profiler_cpu_time_period_ns} -Sets the period for a CPU clock timer of the [query profiler](../../operations/optimizing-performance/sampling-query-profiler.md). This timer counts only CPU time. +Устанавливает период для таймера CPU [query profiler](../../operations/optimizing-performance/sampling-query-profiler.md). Этот таймер считает только время CPU. -Possible values: +Возможные значения: -- Positive integer number of nanoseconds. +- Положительное целое число в наносекундах. - Recommended values: + Рекомендуемые значения: - - 10000000 (100 times a second) nanosecods and more for for single queries. - - 1000000000 (once a second) for cluster-wide profiling. + - 10000000 (100 раз в секунду) наносекунд и большее значение для одиночных запросов. + - 1000000000 (раз в секунду) для профилирования в масштабе кластера. -- 0 for turning off the timer. +- 0 для выключения таймера. -Type: [UInt64](../../sql-reference/data-types/int-uint.md). +Тип: [UInt64](../../sql-reference/data-types/int-uint.md). -Default value: 1000000000 nanoseconds. +Значение по умолчанию: 1000000000 наносекунд. -See also: +См. также: -- System table [trace\_log](../../operations/system-tables/trace_log.md#system_tables-trace_log) +- Системная таблица [trace\_log](../../operations/system-tables/trace_log.md#system_tables-trace_log) ## allow_introspection_functions {#settings-allow_introspection_functions} -Enables of disables [introspections functions](../../sql-reference/functions/introspection.md) for query profiling. +Включает или отключает [функции самоанализа](../../sql-reference/functions/introspection.md) для профилирования запросов. -Possible values: +Возможные значения: -- 1 — Introspection functions enabled. -- 0 — Introspection functions disabled. +- 1 — включены функции самоанализа. +- 0 — функции самоанализа отключены. -Default value: 0. +Значение по умолчанию: 0. -**See Also** +**См. также** - [Sampling Query Profiler](../optimizing-performance/sampling-query-profiler.md) -- System table [trace\_log](../../operations/system-tables/trace_log.md#system_tables-trace_log) +- Системная таблица [trace\_log](../../operations/system-tables/trace_log.md#system_tables-trace_log) + +## input\_format\_parallel\_parsing {#input-format-parallel-parsing} + +- Тип: bool +- Значение по умолчанию: True + +Обеспечивает параллельный анализ форматов данных с сохранением порядка. Поддерживается только для форматов TSV, TKSV, CSV и JSONEachRow. + +## min\_chunk\_bytes\_for\_parallel\_parsing {#min-chunk-bytes-for-parallel-parsing} + +- Тип: unsigned int +- Значение по умолчанию: 1 MiB + +Минимальный размер блока в байтах, который каждый поток будет анализировать параллельно. + +## output\_format\_avro\_codec {#settings-output_format_avro_codec} + +Устанавливает кодек сжатия, используемый для вывода файла Avro. + +Тип: строка + +Возможные значения: + +- `null` — без сжатия +- `deflate` — сжать с помощью Deflate (zlib) +- `snappy` — сжать с помощью [Snappy](https://google.github.io/snappy/) + +Значение по умолчанию: `snappy` (если доступно) или `deflate`. + +## output\_format\_avro\_sync\_interval {#settings-output_format_avro_sync_interval} + +Устанавливает минимальный размер данных (в байтах) между маркерами синхронизации для выходного файла Avro. + +Тип: unsigned int + +озможные значения: 32 (32 байта) - 1073741824 (1 GiB) + +Значение по умолчанию: 32768 (32 KiB) ## background\_pool\_size {#background_pool_size} @@ -1624,6 +1714,26 @@ SELECT idx, i FROM null_in WHERE i IN (1, NULL) SETTINGS transform_null_in = 1; - [min_insert_block_size_bytes](#min-insert-block-size-bytes) +## output\_format\_pretty\_grid\_charset {#output-format-pretty-grid-charset} + +Позволяет изменить кодировку, которая используется для печати грид-границ. Доступны следующие кодировки: UTF-8, ASCII. + +**Пример** + +``` text +SET output_format_pretty_grid_charset = 'UTF-8'; +SELECT * FROM a; +┌─a─┐ +│ 1 │ +└───┘ + +SET output_format_pretty_grid_charset = 'ASCII'; +SELECT * FROM a; ++-a-+ +| 1 | ++---+ +``` + ## optimize_read_in_order {#optimize_read_in_order} Включает или отключает оптимизацию в запросах [SELECT](../../sql-reference/statements/select/index.md) с секцией [ORDER BY](../../sql-reference/statements/select/order-by.md#optimize_read_in_order) при работе с таблицами семейства [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md). -- GitLab