id
stringlengths
36
36
document
stringlengths
3
3k
metadata
stringlengths
23
69
embeddings
listlengths
384
384
ca000c3f-dc80-4e4a-938d-88134cbe1d8e
max_postpone_time_for_failed_mutations_ms {#max_postpone_time_for_failed_mutations_ms} The maximum postpone time for failed mutations. max_postpone_time_for_failed_replicated_fetches_ms {#max_postpone_time_for_failed_replicated_fetches_ms} The maximum postpone time for failed replicated fetches. max_postpone_time_for_failed_replicated_merges_ms {#max_postpone_time_for_failed_replicated_merges_ms} The maximum postpone time for failed replicated merges. max_postpone_time_for_failed_replicated_tasks_ms {#max_postpone_time_for_failed_replicated_tasks_ms} The maximum postpone time for failed replicated task. The value is used if the task is not a fetch, merge or mutation. max_projections {#max_projections} The maximum number of merge tree projections. max_replicated_fetches_network_bandwidth {#max_replicated_fetches_network_bandwidth} Limits the maximum speed of data exchange over the network in bytes per second for replicated fetches. This setting is applied to a particular table, unlike the max_replicated_fetches_network_bandwidth_for_server setting, which is applied to the server. You can limit both server network and network for a particular table, but for this the value of the table-level setting should be less than server-level one. Otherwise the server considers only the max_replicated_fetches_network_bandwidth_for_server setting. The setting isn't followed perfectly accurately. Possible values: Positive integer. 0 — Unlimited. Default value: 0 . Usage Could be used for throttling speed when replicating data to add or replace new nodes. max_replicated_logs_to_keep {#max_replicated_logs_to_keep} How many records may be in the ClickHouse Keeper log if there is inactive replica. An inactive replica becomes lost when when this number exceed. Possible values: - Any positive integer. max_replicated_merges_in_queue {#max_replicated_merges_in_queue} How many tasks of merging and mutating parts are allowed simultaneously in ReplicatedMergeTree queue. max_replicated_merges_with_ttl_in_queue {#max_replicated_merges_with_ttl_in_queue} How many tasks of merging parts with TTL are allowed simultaneously in ReplicatedMergeTree queue. max_replicated_mutations_in_queue {#max_replicated_mutations_in_queue} How many tasks of mutating parts are allowed simultaneously in ReplicatedMergeTree queue. max_replicated_sends_network_bandwidth {#max_replicated_sends_network_bandwidth} Limits the maximum speed of data exchange over the network in bytes per second for replicated sends. This setting is applied to a particular table, unlike the max_replicated_sends_network_bandwidth_for_server setting, which is applied to the server. You can limit both server network and network for a particular table, but for this the value of the table-level setting should be less than server-level one. Otherwise the server considers only the
{"source_file": "merge-tree-settings.md"}
[ -0.01610281877219677, 0.002905135042965412, -0.013158649206161499, -0.018935924395918846, -0.030200010165572166, -0.07933785766363144, -0.05949948728084564, 0.08890245854854584, 0.007377494126558304, 0.054421354085206985, 0.04816102981567383, -0.020457591861486435, 0.07577061653137207, -0....
b23b1d63-0b0d-46a8-943e-ffebdc0d9c16
You can limit both server network and network for a particular table, but for this the value of the table-level setting should be less than server-level one. Otherwise the server considers only the max_replicated_sends_network_bandwidth_for_server setting. The setting isn't followed perfectly accurately. Possible values: Positive integer. 0 — Unlimited. Usage Could be used for throttling speed when replicating data to add or replace new nodes. max_suspicious_broken_parts {#max_suspicious_broken_parts} If the number of broken parts in a single partition exceeds the max_suspicious_broken_parts value, automatic deletion is denied. Possible values: - Any positive integer. max_suspicious_broken_parts_bytes {#max_suspicious_broken_parts_bytes} Max size of all broken parts, if more - deny automatic deletion. Possible values: - Any positive integer. max_uncompressed_bytes_in_patches {#max_uncompressed_bytes_in_patches} The maximum uncompressed size of data in all patch parts in bytes. If amount of data in all patch parts exceeds this value, lightweight updates will be rejected. 0 - unlimited. merge_max_block_size {#merge_max_block_size} The number of rows that are read from the merged parts into memory. Possible values: - Any positive integer. Merge reads rows from parts in blocks of merge_max_block_size rows, then merges and writes the result into a new part. The read block is placed in RAM, so merge_max_block_size affects the size of the RAM required for the merge. Thus, merges can consume a large amount of RAM for tables with very wide rows (if the average row size is 100kb, then when merging 10 parts, (100kb * 10 * 8192) = ~ 8GB of RAM). By decreasing merge_max_block_size , you can reduce the amount of RAM required for a merge but slow down a merge. merge_max_block_size_bytes {#merge_max_block_size_bytes} How many bytes in blocks should be formed for merge operations. By default has the same value as index_granularity_bytes . merge_max_bytes_to_prewarm_cache {#merge_max_bytes_to_prewarm_cache} Only available in ClickHouse Cloud. Maximal size of part (compact or packed) to prewarm cache during merge. merge_max_dynamic_subcolumns_in_wide_part {#merge_max_dynamic_subcolumns_in_wide_part} The maximum number of dynamic subcolumns that can be created in every column in the Wide data part after merge. It allows to reduce number of files created in Wide data part regardless of dynamic parameters specified in the data type. For example, if the table has a column with the JSON(max_dynamic_paths=1024) type and the setting merge_max_dynamic_subcolumns_in_wide_part is set to 128, after merge into the Wide data part number of dynamic paths will be decreased to 128 in this part and only 128 paths will be written as dynamic subcolumns. merge_selecting_sleep_ms {#merge_selecting_sleep_ms}
{"source_file": "merge-tree-settings.md"}
[ -0.06429122388362885, 0.00134687265381217, 0.007256334647536278, -0.028008680790662766, 0.01420966163277626, -0.08887752145528793, 0.015133531764149666, -0.03412715718150139, -0.029862582683563232, 0.07529158890247345, -0.007818605750799179, 0.04832291230559349, 0.12649455666542053, -0.021...
5ee0f745-15b4-490d-8c23-e0965584abc8
merge_selecting_sleep_ms {#merge_selecting_sleep_ms} Minimum time to wait before trying to select parts to merge again after no parts were selected. A lower setting will trigger selecting tasks in background_schedule_pool frequently which result in large amount of requests to zookeeper in large-scale clusters merge_selecting_sleep_slowdown_factor {#merge_selecting_sleep_slowdown_factor} The sleep time for merge selecting task is multiplied by this factor when there's nothing to merge and divided when a merge was assigned merge_selector_algorithm {#merge_selector_algorithm} The algorithm to select parts for merges assignment merge_selector_base {#merge_selector_base} Affects write amplification of assigned merges (expert level setting, don't change if you don't understand what it is doing). Works for Simple and StochasticSimple merge selectors merge_selector_blurry_base_scale_factor {#merge_selector_blurry_base_scale_factor} Controls when the logic kicks in relatively to the number of parts in partition. The bigger the factor the more belated reaction will be. merge_selector_enable_heuristic_to_remove_small_parts_at_right {#merge_selector_enable_heuristic_to_remove_small_parts_at_right} Enable heuristic for selecting parts for merge which removes parts from right side of range, if their size is less than specified ratio (0.01) of sum_size. Works for Simple and StochasticSimple merge selectors merge_selector_window_size {#merge_selector_window_size} How many parts to look at once. merge_total_max_bytes_to_prewarm_cache {#merge_total_max_bytes_to_prewarm_cache} Only available in ClickHouse Cloud. Maximal size of parts in total to prewarm cache during merge. merge_tree_clear_old_broken_detached_parts_ttl_timeout_seconds {#merge_tree_clear_old_broken_detached_parts_ttl_timeout_seconds} Obsolete setting, does nothing. merge_tree_clear_old_parts_interval_seconds {#merge_tree_clear_old_parts_interval_seconds} Sets the interval in seconds for ClickHouse to execute the cleanup of old parts, WALs, and mutations. Possible values: - Any positive integer. merge_tree_clear_old_temporary_directories_interval_seconds {#merge_tree_clear_old_temporary_directories_interval_seconds} Sets the interval in seconds for ClickHouse to execute the cleanup of old temporary directories. Possible values: - Any positive integer. merge_tree_enable_clear_old_broken_detached {#merge_tree_enable_clear_old_broken_detached} Obsolete setting, does nothing. merge_with_recompression_ttl_timeout {#merge_with_recompression_ttl_timeout} Minimum delay in seconds before repeating a merge with recompression TTL. merge_with_ttl_timeout {#merge_with_ttl_timeout} Minimum delay in seconds before repeating a merge with delete TTL. merge_workload {#merge_workload}
{"source_file": "merge-tree-settings.md"}
[ 0.053820881992578506, -0.038081325590610504, 0.03359558805823326, 0.05164588615298271, 0.08798810839653015, -0.10757408291101456, 0.015294432640075684, 0.020792534574866295, -0.006663493346422911, -0.01671254262328148, 0.016043057665228844, -0.028910519555211067, -0.029447054490447044, -0....
9216a12d-b907-4858-ace4-4248c974b000
merge_with_ttl_timeout {#merge_with_ttl_timeout} Minimum delay in seconds before repeating a merge with delete TTL. merge_workload {#merge_workload} Used to regulate how resources are utilized and shared between merges and other workloads. Specified value is used as workload setting value for background merges of this table. If not specified (empty string), then server setting merge_workload is used instead. See Also - Workload Scheduling min_absolute_delay_to_close {#min_absolute_delay_to_close} Minimal absolute delay to close, stop serving requests and not return Ok during status check. min_age_to_force_merge_on_partition_only {#min_age_to_force_merge_on_partition_only} Whether min_age_to_force_merge_seconds should be applied only on the entire partition and not on subset. By default, ignores setting max_bytes_to_merge_at_max_space_in_pool (see enable_max_bytes_limit_for_min_age_to_force_merge ). Possible values: - true, false min_age_to_force_merge_seconds {#min_age_to_force_merge_seconds} Merge parts if every part in the range is older than the value of min_age_to_force_merge_seconds . By default, ignores setting max_bytes_to_merge_at_max_space_in_pool (see enable_max_bytes_limit_for_min_age_to_force_merge ). Possible values: - Positive integer. min_bytes_for_compact_part {#min_bytes_for_compact_part} Obsolete setting, does nothing. min_bytes_for_full_part_storage {#min_bytes_for_full_part_storage} Only available in ClickHouse Cloud. Minimal uncompressed size in bytes to use full type of storage for data part instead of packed min_bytes_for_wide_part {#min_bytes_for_wide_part} Minimum number of bytes/rows in a data part that can be stored in Wide format. You can set one, both or none of these settings. min_bytes_to_prewarm_caches {#min_bytes_to_prewarm_caches} Minimal size (uncompressed bytes) to prewarm mark cache and primary index cache for new parts min_bytes_to_rebalance_partition_over_jbod {#min_bytes_to_rebalance_partition_over_jbod} Sets minimal amount of bytes to enable balancing when distributing new big parts over volume disks JBOD . Possible values: Positive integer. 0 — Balancing is disabled. Usage The value of the min_bytes_to_rebalance_partition_over_jbod setting should not be less than the value of the max_bytes_to_merge_at_max_space_in_pool / 1024. Otherwise, ClickHouse throws an exception. min_compress_block_size {#min_compress_block_size} Minimum size of blocks of uncompressed data required for compression when writing the next mark. You can also specify this setting in the global settings (see min_compress_block_size setting). The value specified when the table is created overrides the global value for this setting. min_compressed_bytes_to_fsync_after_fetch {#min_compressed_bytes_to_fsync_after_fetch} Minimal number of compressed bytes to do fsync for part after fetch (0 - disabled)
{"source_file": "merge-tree-settings.md"}
[ 0.0038872293662279844, -0.009969713166356087, -0.04137159883975983, -0.02817828767001629, -0.03348817676305771, -0.04687992110848427, 0.004044655244797468, 0.045182690024375916, 0.043289992958307266, -0.010571824386715889, 0.06752441823482513, 0.01033921167254448, -0.01122166309505701, 0.0...
e56547ce-4829-4713-a154-fa632e7091ea
min_compressed_bytes_to_fsync_after_fetch {#min_compressed_bytes_to_fsync_after_fetch} Minimal number of compressed bytes to do fsync for part after fetch (0 - disabled) min_compressed_bytes_to_fsync_after_merge {#min_compressed_bytes_to_fsync_after_merge} Minimal number of compressed bytes to do fsync for part after merge (0 - disabled) min_delay_to_insert_ms {#min_delay_to_insert_ms} Min delay of inserting data into MergeTree table in milliseconds, if there are a lot of unmerged parts in single partition. min_delay_to_mutate_ms {#min_delay_to_mutate_ms} Min delay of mutating MergeTree table in milliseconds, if there are a lot of unfinished mutations min_free_disk_bytes_to_perform_insert {#min_free_disk_bytes_to_perform_insert} The minimum number of bytes that should be free in disk space in order to insert data. If the number of available free bytes is less than min_free_disk_bytes_to_perform_insert then an exception is thrown and the insert is not executed. Note that this setting: - takes into account the keep_free_space_bytes setting. - does not take into account the amount of data that will be written by the INSERT operation. - is only checked if a positive (non-zero) number of bytes is specified Possible values: - Any positive integer. :::note If both min_free_disk_bytes_to_perform_insert and min_free_disk_ratio_to_perform_insert are specified, ClickHouse will count on the value that will allow to perform inserts on a bigger amount of free memory. ::: min_free_disk_ratio_to_perform_insert {#min_free_disk_ratio_to_perform_insert} The minimum free to total disk space ratio to perform an INSERT . Must be a floating point value between 0 and 1. Note that this setting: - takes into account the keep_free_space_bytes setting. - does not take into account the amount of data that will be written by the INSERT operation. - is only checked if a positive (non-zero) ratio is specified Possible values: - Float, 0.0 - 1.0 Note that if both min_free_disk_ratio_to_perform_insert and min_free_disk_bytes_to_perform_insert are specified, ClickHouse will count on the value that will allow to perform inserts on a bigger amount of free memory. min_index_granularity_bytes {#min_index_granularity_bytes} Min allowed size of data granules in bytes. To provide a safeguard against accidentally creating tables with very low index_granularity_bytes . min_level_for_full_part_storage {#min_level_for_full_part_storage} Only available in ClickHouse Cloud. Minimal part level to use full type of storage for data part instead of packed min_level_for_wide_part {#min_level_for_wide_part} Minimal part level to create a data part in Wide format instead of Compact . min_marks_to_honor_max_concurrent_queries {#min_marks_to_honor_max_concurrent_queries} The minimal number of marks read by the query for applying the max_concurrent_queries setting.
{"source_file": "merge-tree-settings.md"}
[ 0.008812712505459785, -0.011758456937968731, -0.008546169847249985, 0.022678403183817863, 0.03237292170524597, -0.10118041187524796, -0.05079641193151474, 0.09355039149522781, 0.034637488424777985, 0.03972479701042175, 0.05130545794963837, 0.000024183584173442796, 0.015105070546269417, -0....
4c24c9c2-2182-4e37-82f8-e78dede96417
min_marks_to_honor_max_concurrent_queries {#min_marks_to_honor_max_concurrent_queries} The minimal number of marks read by the query for applying the max_concurrent_queries setting. :::note Queries will still be limited by other max_concurrent_queries settings. ::: Possible values: - Positive integer. - 0 — Disabled ( max_concurrent_queries limit applied to no queries). Example xml <min_marks_to_honor_max_concurrent_queries>10</min_marks_to_honor_max_concurrent_queries> min_merge_bytes_to_use_direct_io {#min_merge_bytes_to_use_direct_io} The minimum data volume for merge operation that is required for using direct I/O access to the storage disk. When merging data parts, ClickHouse calculates the total storage volume of all the data to be merged. If the volume exceeds min_merge_bytes_to_use_direct_io bytes, ClickHouse reads and writes the data to the storage disk using the direct I/O interface ( O_DIRECT option). If min_merge_bytes_to_use_direct_io = 0 , then direct I/O is disabled. min_parts_to_merge_at_once {#min_parts_to_merge_at_once} Minimal amount of data parts which merge selector can pick to merge at once (expert level setting, don't change if you don't understand what it is doing). 0 - disabled. Works for Simple and StochasticSimple merge selectors. min_relative_delay_to_close {#min_relative_delay_to_close} Minimal delay from other replicas to close, stop serving requests and not return Ok during status check. min_relative_delay_to_measure {#min_relative_delay_to_measure} Calculate relative replica delay only if absolute delay is not less that this value. min_relative_delay_to_yield_leadership {#min_relative_delay_to_yield_leadership} Obsolete setting, does nothing. min_replicated_logs_to_keep {#min_replicated_logs_to_keep} Keep about this number of last records in ZooKeeper log, even if they are obsolete. It doesn't affect work of tables: used only to diagnose ZooKeeper log before cleaning. Possible values: - Any positive integer. min_rows_for_compact_part {#min_rows_for_compact_part} Obsolete setting, does nothing. min_rows_for_full_part_storage {#min_rows_for_full_part_storage} Only available in ClickHouse Cloud. Minimal number of rows to use full type of storage for data part instead of packed min_rows_for_wide_part {#min_rows_for_wide_part} Minimal number of rows to create a data part in Wide format instead of Compact . min_rows_to_fsync_after_merge {#min_rows_to_fsync_after_merge} Minimal number of rows to do fsync for part after merge (0 - disabled) mutation_workload {#mutation_workload} Used to regulate how resources are utilized and shared between mutations and other workloads. Specified value is used as workload setting value for background mutations of this table. If not specified (empty string), then server setting mutation_workload is used instead. See Also - Workload Scheduling
{"source_file": "merge-tree-settings.md"}
[ -0.002669904613867402, -0.0014210609951987863, -0.0658898800611496, -0.015891432762145996, -0.1025971844792366, -0.110863596200943, 0.022499805316329002, 0.0690625011920929, -0.00964756216853857, 0.011437786743044853, 0.058446645736694336, -0.01269966084510088, 0.07824160903692245, -0.0382...
9763a144-2a06-4c9d-bc65-a7514a6b3fca
See Also - Workload Scheduling non_replicated_deduplication_window {#non_replicated_deduplication_window} The number of the most recently inserted blocks in the non-replicated MergeTree table for which hash sums are stored to check for duplicates. Possible values: - Any positive integer. - 0 (disable deduplication). A deduplication mechanism is used, similar to replicated tables (see replicated_deduplication_window setting). The hash sums of the created parts are written to a local file on a disk. notify_newest_block_number {#notify_newest_block_number} Notify newest block number to SharedJoin or SharedSet. Only in ClickHouse Cloud. number_of_free_entries_in_pool_to_execute_mutation {#number_of_free_entries_in_pool_to_execute_mutation} When there is less than specified number of free entries in pool, do not execute part mutations. This is to leave free threads for regular merges and to avoid "Too many parts" errors. Possible values: - Any positive integer. Usage The value of the number_of_free_entries_in_pool_to_execute_mutation setting should be less than the value of the background_pool_size * background_merges_mutations_concurrency_ratio . Otherwise, ClickHouse will throw an exception. number_of_free_entries_in_pool_to_execute_optimize_entire_partition {#number_of_free_entries_in_pool_to_execute_optimize_entire_partition} When there is less than specified number of free entries in pool, do not execute optimizing entire partition in the background (this task generated when set min_age_to_force_merge_seconds and enable min_age_to_force_merge_on_partition_only ). This is to leave free threads for regular merges and avoid "Too many parts". Possible values: - Positive integer. The value of the number_of_free_entries_in_pool_to_execute_optimize_entire_partition setting should be less than the value of the background_pool_size * background_merges_mutations_concurrency_ratio . Otherwise, ClickHouse throws an exception. number_of_free_entries_in_pool_to_lower_max_size_of_merge {#number_of_free_entries_in_pool_to_lower_max_size_of_merge} When there is less than the specified number of free entries in pool (or replicated queue), start to lower maximum size of merge to process (or to put in queue). This is to allow small merges to process - not filling the pool with long running merges. Possible values: - Any positive integer. number_of_mutations_to_delay {#number_of_mutations_to_delay} If table has at least that many unfinished mutations, artificially slow down mutations of table. Disabled if set to 0 number_of_mutations_to_throw {#number_of_mutations_to_throw} If table has at least that many unfinished mutations, throw 'Too many mutations' exception. Disabled if set to 0 number_of_partitions_to_consider_for_merge {#number_of_partitions_to_consider_for_merge}
{"source_file": "merge-tree-settings.md"}
[ -0.08119740337133408, -0.014000985771417618, 0.008688033558428288, -0.020700545981526375, 0.022195778787136078, -0.05865156650543213, 0.020185241475701332, -0.06043689697980881, 0.09058324992656708, 0.03385559096932411, 0.03982985019683838, 0.005459688138216734, 0.05300702899694443, -0.096...
6891c228-05d6-4f1d-a59b-283210bf162b
number_of_partitions_to_consider_for_merge {#number_of_partitions_to_consider_for_merge} Only available in ClickHouse Cloud. Up to top N partitions which we will consider for merge. Partitions picked in a random weighted way where weight is amount of data parts which can be merged in this partition. object_serialization_version {#object_serialization_version} Serialization version for JSON data type. Required for compatibility. Possible values: - v1 - v2 - v3 Only version v3 supports changing the shared data serialization version. object_shared_data_buckets_for_compact_part {#object_shared_data_buckets_for_compact_part} Number of buckets for JSON shared data serialization in Compact parts. Works with map_with_buckets and advanced shared data serializations. object_shared_data_buckets_for_wide_part {#object_shared_data_buckets_for_wide_part} Number of buckets for JSON shared data serialization in Wide parts. Works with map_with_buckets and advanced shared data serializations. object_shared_data_serialization_version {#object_shared_data_serialization_version} Serialization version for shared data inside JSON data type. Possible values: - map - store shared data as Map(String, String) - map_with_buckets - store shared data as several separate Map(String, String) columns. Using buckets improves reading individual paths from shared data. - advanced - special serialization of shared data designed to significantly improve reading of individual paths from shared data. Note that this serialization increases the shared data storage size on disk because we store a lot of additional information. Number of buckets for map_with_buckets and advanced serializations is determined by settings object_shared_data_buckets_for_compact_part / object_shared_data_buckets_for_wide_part . object_shared_data_serialization_version_for_zero_level_parts {#object_shared_data_serialization_version_for_zero_level_parts} This setting allows to specify different serialization version of the shared data inside JSON type for zero level parts that are created during inserts. It's recommended not to use advanced shared data serialization for zero level parts because it can increase the insertion time significantly. old_parts_lifetime {#old_parts_lifetime} The time (in seconds) of storing inactive parts to protect against data loss during spontaneous server reboots. Possible values: - Any positive integer. After merging several parts into a new part, ClickHouse marks the original parts as inactive and deletes them only after old_parts_lifetime seconds. Inactive parts are removed if they are not used by current queries, i.e. if the refcount of the part is 1.
{"source_file": "merge-tree-settings.md"}
[ -0.020326022058725357, -0.025172311812639236, 0.03372788801789284, -0.03754191845655441, 0.013140134513378143, -0.04015273228287697, -0.051068518310785294, 0.011239050887525082, -0.054283980280160904, -0.03414237126708031, 0.005681862123310566, -0.007625023368746042, -0.016421284526586533, ...
26cf8626-3c39-48bb-a15b-8195abc1ad16
fsync is not called for new parts, so for some time new parts exist only in the server's RAM (OS cache). If the server is rebooted spontaneously, new parts can be lost or damaged. To protect data inactive parts are not deleted immediately. During startup ClickHouse checks the integrity of the parts. If the merged part is damaged ClickHouse returns the inactive parts to the active list, and later merges them again. Then the damaged part is renamed (the broken_ prefix is added) and moved to the detached folder. If the merged part is not damaged, then the original inactive parts are renamed (the ignored_ prefix is added) and moved to the detached folder. The default dirty_expire_centisecs value (a Linux kernel setting) is 30 seconds (the maximum time that written data is stored only in RAM), but under heavy loads on the disk system data can be written much later. Experimentally, a value of 480 seconds was chosen for old_parts_lifetime , during which a new part is guaranteed to be written to disk. optimize_row_order {#optimize_row_order} Controls if the row order should be optimized during inserts to improve the compressability of the newly inserted table part. Only has an effect for ordinary MergeTree-engine tables. Does nothing for specialized MergeTree engine tables (e.g. CollapsingMergeTree). MergeTree tables are (optionally) compressed using compression codecs . Generic compression codecs such as LZ4 and ZSTD achieve maximum compression rates if the data exposes patterns. Long runs of the same value typically compress very well. If this setting is enabled, ClickHouse attempts to store the data in newly inserted parts in a row order that minimizes the number of equal-value runs across the columns of the new table part. In other words, a small number of equal-value runs mean that individual runs are long and compress well. Finding the optimal row order is computationally infeasible (NP hard). Therefore, ClickHouse uses a heuristics to quickly find a row order which still improves compression rates over the original row order. Heuristics for finding a row order It is generally possible to shuffle the rows of a table (or table part) freely as SQL considers the same table (table part) in different row order equivalent.
{"source_file": "merge-tree-settings.md"}
[ -0.036475375294685364, -0.06150832027196884, -0.020536046475172043, 0.051426663994789124, 0.11923332512378693, -0.1274658888578415, -0.026960505172610283, 0.05265616998076439, 0.06778804957866669, -0.004891368560492992, 0.10850242525339127, 0.15650756657123566, -0.03581974282860756, -0.023...
3227bb88-b580-4639-9673-51dc7777a928
Heuristics for finding a row order It is generally possible to shuffle the rows of a table (or table part) freely as SQL considers the same table (table part) in different row order equivalent. This freedom of shuffling rows is restricted when a primary key is defined for the table. In ClickHouse, a primary key `C1, C2, ..., CN` enforces that the table rows are sorted by columns `C1`, `C2`, ... `Cn` ([clustered index](https://en.wikipedia.org/wiki/Database_index#Clustered)). As a result, rows can only be shuffled within "equivalence classes" of row, i.e. rows which have the same values in their primary key columns. The intuition is that primary keys with high-cardinality, e.g. primary keys involving a `DateTime64` timestamp column, lead to many small equivalence classes. Likewise, tables with a low-cardinality primary key, create few and large equivalence classes. A table with no primary key represents the extreme case of a single equivalence class which spans all rows. The fewer and the larger the equivalence classes are, the higher the degree of freedom when re-shuffling rows. The heuristics applied to find the best row order within each equivalence class is suggested by D. Lemire, O. Kaser in [Reordering columns for smaller indexes](https://doi.org/10.1016/j.ins.2011.02.002) and based on sorting the rows within each equivalence class by ascending cardinality of the non-primary key columns. It performs three steps: 1. Find all equivalence classes based on the row values in primary key columns. 2. For each equivalence class, calculate (usually estimate) the cardinalities of the non-primary-key columns. 3. For each equivalence class, sort the rows in order of ascending non-primary-key column cardinality. If enabled, insert operations incur additional CPU costs to analyze and optimize the row order of the new data. INSERTs are expected to take 30-50% longer depending on the data characteristics. Compression rates of LZ4 or ZSTD improve on average by 20-40%. This setting works best for tables with no primary key or a low-cardinality primary key, i.e. a table with only few distinct primary key values. High-cardinality primary keys, e.g. involving timestamp columns of type DateTime64 , are not expected to benefit from this setting. part_moves_between_shards_delay_seconds {#part_moves_between_shards_delay_seconds} Time to wait before/after moving parts between shards. part_moves_between_shards_enable {#part_moves_between_shards_enable} Experimental/Incomplete feature to move parts between shards. Does not take into account sharding expressions. parts_to_delay_insert {#parts_to_delay_insert} If the number of active parts in a single partition exceeds the parts_to_delay_insert value, an INSERT is artificially slowed down. Possible values: - Any positive integer. ClickHouse artificially executes INSERT longer (adds 'sleep') so that the background merge process can merge parts faster than they are added.
{"source_file": "merge-tree-settings.md"}
[ -0.0748625248670578, -0.04891357570886612, -0.040907956659793854, -0.041423648595809937, 0.017816707491874695, -0.007102868985384703, -0.0430733896791935, -0.058038048446178436, 0.09602034091949463, 0.058084066957235336, 0.0008636339916847646, 0.08002428710460663, 0.058374300599098206, -0....
90c757a6-3036-4b74-97c0-4b1e5fa30920
Possible values: - Any positive integer. ClickHouse artificially executes INSERT longer (adds 'sleep') so that the background merge process can merge parts faster than they are added. parts_to_throw_insert {#parts_to_throw_insert} If the number of active parts in a single partition exceeds the parts_to_throw_insert value, INSERT is interrupted with the Too many parts (N). Merges are processing significantly slower than inserts exception. Possible values: - Any positive integer. To achieve maximum performance of SELECT queries, it is necessary to minimize the number of parts processed, see Merge Tree . Prior to version 23.6 this setting was set to 300. You can set a higher different value, it will reduce the probability of the Too many parts error, but at the same time SELECT performance might degrade. Also in case of a merge issue (for example, due to insufficient disk space) you will notice it later than you would with the original 300. prefer_fetch_merged_part_size_threshold {#prefer_fetch_merged_part_size_threshold} If the sum of the size of parts exceeds this threshold and the time since a replication log entry creation is greater than prefer_fetch_merged_part_time_threshold , then prefer fetching merged part from a replica instead of doing merge locally. This is to speed up very long merges. Possible values: - Any positive integer. prefer_fetch_merged_part_time_threshold {#prefer_fetch_merged_part_time_threshold} If the time passed since a replication log (ClickHouse Keeper or ZooKeeper) entry creation exceeds this threshold, and the sum of the size of parts is greater than prefer_fetch_merged_part_size_threshold , then prefer fetching merged part from a replica instead of doing merge locally. This is to speed up very long merges. Possible values: - Any positive integer. prewarm_mark_cache {#prewarm_mark_cache} If true mark cache will be prewarmed by saving marks to mark cache on inserts, merges, fetches and on startup of server prewarm_primary_key_cache {#prewarm_primary_key_cache} If true primary index cache will be prewarmed by saving marks to mark cache on inserts, merges, fetches and on startup of server primary_key_compress_block_size {#primary_key_compress_block_size} Primary compress block size, the actual size of the block to compress. primary_key_compression_codec {#primary_key_compression_codec} Compression encoding used by primary, primary key is small enough and cached, so the default compression is ZSTD(3). primary_key_lazy_load {#primary_key_lazy_load} Load primary key in memory on first use instead of on table initialization. This can save memory in the presence of a large number of tables. primary_key_ratio_of_unique_prefix_values_to_skip_suffix_columns {#primary_key_ratio_of_unique_prefix_values_to_skip_suffix_columns}
{"source_file": "merge-tree-settings.md"}
[ -0.00994905922561884, -0.06349676847457886, 0.01922697387635708, 0.0037096745800226927, 0.006485208868980408, -0.08750245720148087, -0.0003471988602541387, 0.05573668330907822, -0.002342617604881525, -0.03027232736349106, 0.04811932519078255, 0.017552057281136513, 0.016200479120016098, -0....
9760ba6a-88e4-4808-9d79-4074999a2750
primary_key_ratio_of_unique_prefix_values_to_skip_suffix_columns {#primary_key_ratio_of_unique_prefix_values_to_skip_suffix_columns} If the value of a column of the primary key in data part changes at least in this ratio of times, skip loading next columns in memory. This allows to save memory usage by not loading useless columns of the primary key. ratio_of_defaults_for_sparse_serialization {#ratio_of_defaults_for_sparse_serialization} Minimal ratio of the number of default values to the number of all values in a column. Setting this value causes the column to be stored using sparse serializations. If a column is sparse (contains mostly zeros), ClickHouse can encode it in a sparse format and automatically optimize calculations - the data does not require full decompression during queries. To enable this sparse serialization, define the ratio_of_defaults_for_sparse_serialization setting to be less than 1.0. If the value is greater than or equal to 1.0, then the columns will be always written using the normal full serialization. Possible values: Float between 0 and 1 to enable sparse serialization 1.0 (or greater) if you do not want to use sparse serialization Example Notice the s column in the following table is an empty string for 95% of the rows. In my_regular_table we do not use sparse serialization, and in my_sparse_table we set ratio_of_defaults_for_sparse_serialization to 0.95: ``sql CREATE TABLE my_regular_table ( id UInt64, s` String ) ENGINE = MergeTree ORDER BY id; INSERT INTO my_regular_table SELECT number AS id, number % 20 = 0 ? toString(number): '' AS s FROM numbers(10000000); CREATE TABLE my_sparse_table ( id UInt64, s String ) ENGINE = MergeTree ORDER BY id SETTINGS ratio_of_defaults_for_sparse_serialization = 0.95; INSERT INTO my_sparse_table SELECT number, number % 20 = 0 ? toString(number): '' FROM numbers(10000000); ``` Notice the s column in my_sparse_table uses less storage space on disk: sql SELECT table, name, data_compressed_bytes, data_uncompressed_bytes FROM system.columns WHERE table LIKE 'my_%_table'; response ┌─table────────────┬─name─┬─data_compressed_bytes─┬─data_uncompressed_bytes─┐ │ my_regular_table │ id │ 37790741 │ 75488328 │ │ my_regular_table │ s │ 2451377 │ 12683106 │ │ my_sparse_table │ id │ 37790741 │ 75488328 │ │ my_sparse_table │ s │ 2283454 │ 9855751 │ └──────────────────┴──────┴───────────────────────┴─────────────────────────┘ You can verify if a column is using the sparse encoding by viewing the serialization_kind column of the system.parts_columns table: sql SELECT column, serialization_kind FROM system.parts_columns WHERE table LIKE 'my_sparse_table'; You can see which parts of s were stored using the sparse serialization:
{"source_file": "merge-tree-settings.md"}
[ -0.028189538046717644, -0.012786169536411762, -0.18455356359481812, -0.006094994954764843, -0.07685482501983643, -0.10086457431316376, -0.07938267290592194, 0.020777057856321335, 0.004763543605804443, -0.01562410406768322, 0.06087728217244148, 0.06753785163164139, 0.02940463274717331, -0.0...
f6ecffad-6ace-4410-8a7b-f5d4b831bc51
sql SELECT column, serialization_kind FROM system.parts_columns WHERE table LIKE 'my_sparse_table'; You can see which parts of s were stored using the sparse serialization: response ┌─column─┬─serialization_kind─┐ │ id │ Default │ │ s │ Default │ │ id │ Default │ │ s │ Default │ │ id │ Default │ │ s │ Sparse │ │ id │ Default │ │ s │ Sparse │ │ id │ Default │ │ s │ Sparse │ │ id │ Default │ │ s │ Sparse │ │ id │ Default │ │ s │ Sparse │ │ id │ Default │ │ s │ Sparse │ │ id │ Default │ │ s │ Sparse │ │ id │ Default │ │ s │ Sparse │ │ id │ Default │ │ s │ Sparse │ └────────┴────────────────────┘ reduce_blocking_parts_sleep_ms {#reduce_blocking_parts_sleep_ms} Only available in ClickHouse Cloud. Minimum time to wait before trying to reduce blocking parts again after no ranges were dropped/replaced. A lower setting will trigger tasks in background_schedule_pool frequently which results in large amount of requests to zookeeper in large-scale clusters refresh_parts_interval {#refresh_parts_interval} If it is greater than zero - refresh the list of data parts from the underlying filesystem to check if the data was updated under the hood. It can be set only if the table is located on readonly disks (which means that this is a readonly replica, while data is being written by another replica). refresh_statistics_interval {#refresh_statistics_interval} The interval of refreshing statistics cache in seconds. If it is set to zero, the refreshing will be disabled. remote_fs_execute_merges_on_single_replica_time_threshold {#remote_fs_execute_merges_on_single_replica_time_threshold} When this setting has a value greater than zero only a single replica starts the merge immediately if merged part on shared storage. :::note Zero-copy replication is not ready for production Zero-copy replication is disabled by default in ClickHouse version 22.8 and higher. This feature is not recommended for production use. ::: Possible values: - Any positive integer. remote_fs_zero_copy_path_compatible_mode {#remote_fs_zero_copy_path_compatible_mode} Run zero-copy in compatible mode during conversion process. remote_fs_zero_copy_zookeeper_path {#remote_fs_zero_copy_zookeeper_path} ZooKeeper path for zero-copy table-independent info. remove_empty_parts {#remove_empty_parts} Remove empty parts after they were pruned by TTL, mutation, or collapsing merge algorithm. remove_rolled_back_parts_immediately {#remove_rolled_back_parts_immediately} Setting for an incomplete experimental feature. remove_unused_patch_parts {#remove_unused_patch_parts}
{"source_file": "merge-tree-settings.md"}
[ 0.023940516635775566, 0.01724829711019993, -0.0011515070218592882, 0.11442761868238449, 0.048669736832380295, -0.05261482670903206, -0.013609600253403187, -0.032478153705596924, -0.034630171954631805, 0.023371350020170212, 0.013395378366112709, -0.004672934766858816, 0.03310055658221245, -...
f05fe194-98a2-4332-94e4-b280d0bfb8f3
remove_rolled_back_parts_immediately {#remove_rolled_back_parts_immediately} Setting for an incomplete experimental feature. remove_unused_patch_parts {#remove_unused_patch_parts} Remove in background patch parts which are applied for all active parts. replace_long_file_name_to_hash {#replace_long_file_name_to_hash} If the file name for column is too long (more than 'max_file_name_length' bytes) replace it to SipHash128 replicated_can_become_leader {#replicated_can_become_leader} If true, replicated tables replicas on this node will try to acquire leadership. Possible values: - true - false replicated_deduplication_window {#replicated_deduplication_window} The number of most recently inserted blocks for which ClickHouse Keeper stores hash sums to check for duplicates. Possible values: - Any positive integer. - 0 (disable deduplication) The Insert command creates one or more blocks (parts). For insert deduplication , when writing into replicated tables, ClickHouse writes the hash sums of the created parts into ClickHouse Keeper. Hash sums are stored only for the most recent replicated_deduplication_window blocks. The oldest hash sums are removed from ClickHouse Keeper. A large number for replicated_deduplication_window slows down Inserts because more entries need to be compared. The hash sum is calculated from the composition of the field names and types and the data of the inserted part (stream of bytes). replicated_deduplication_window_for_async_inserts {#replicated_deduplication_window_for_async_inserts} The number of most recently async inserted blocks for which ClickHouse Keeper stores hash sums to check for duplicates. Possible values: - Any positive integer. - 0 (disable deduplication for async_inserts) The Async Insert command will be cached in one or more blocks (parts). For insert deduplication , when writing into replicated tables, ClickHouse writes the hash sums of each insert into ClickHouse Keeper. Hash sums are stored only for the most recent replicated_deduplication_window_for_async_inserts blocks. The oldest hash sums are removed from ClickHouse Keeper. A large number of replicated_deduplication_window_for_async_inserts slows down Async Inserts because it needs to compare more entries. The hash sum is calculated from the composition of the field names and types and the data of the insert (stream of bytes). replicated_deduplication_window_seconds {#replicated_deduplication_window_seconds} The number of seconds after which the hash sums of the inserted blocks are removed from ClickHouse Keeper. Possible values: - Any positive integer. Similar to replicated_deduplication_window , replicated_deduplication_window_seconds specifies how long to store hash sums of blocks for insert deduplication. Hash sums older than
{"source_file": "merge-tree-settings.md"}
[ -0.10816914588212967, 0.036017127335071564, -0.009847447276115417, -0.027073249220848083, 0.025056112557649612, -0.08640879392623901, -0.028265418484807014, -0.049372244626283646, -0.03787235915660858, 0.08487890660762787, 0.07469423115253448, 0.061729371547698975, 0.08613479137420654, -0....
268f02dd-a5a6-41bd-915e-5fb12e5ee7f6
Similar to replicated_deduplication_window , replicated_deduplication_window_seconds specifies how long to store hash sums of blocks for insert deduplication. Hash sums older than replicated_deduplication_window_seconds are removed from ClickHouse Keeper, even if they are less than replicated_deduplication_window . The time is relative to the time of the most recent record, not to the wall time. If it's the only record it will be stored forever. replicated_deduplication_window_seconds_for_async_inserts {#replicated_deduplication_window_seconds_for_async_inserts} The number of seconds after which the hash sums of the async inserts are removed from ClickHouse Keeper. Possible values: - Any positive integer. Similar to replicated_deduplication_window_for_async_inserts , replicated_deduplication_window_seconds_for_async_inserts specifies how long to store hash sums of blocks for async insert deduplication. Hash sums older than replicated_deduplication_window_seconds_for_async_inserts are removed from ClickHouse Keeper, even if they are less than replicated_deduplication_window_for_async_inserts . The time is relative to the time of the most recent record, not to the wall time. If it's the only record it will be stored forever. replicated_fetches_http_connection_timeout {#replicated_fetches_http_connection_timeout} Obsolete setting, does nothing. replicated_fetches_http_receive_timeout {#replicated_fetches_http_receive_timeout} Obsolete setting, does nothing. replicated_fetches_http_send_timeout {#replicated_fetches_http_send_timeout} Obsolete setting, does nothing. replicated_max_mutations_in_one_entry {#replicated_max_mutations_in_one_entry} Max number of mutation commands that can be merged together and executed in one MUTATE_PART entry (0 means unlimited) replicated_max_parallel_fetches {#replicated_max_parallel_fetches} Obsolete setting, does nothing. replicated_max_parallel_fetches_for_host {#replicated_max_parallel_fetches_for_host} Obsolete setting, does nothing. replicated_max_parallel_fetches_for_table {#replicated_max_parallel_fetches_for_table} Obsolete setting, does nothing. replicated_max_parallel_sends {#replicated_max_parallel_sends} Obsolete setting, does nothing. replicated_max_parallel_sends_for_table {#replicated_max_parallel_sends_for_table} Obsolete setting, does nothing. replicated_max_ratio_of_wrong_parts {#replicated_max_ratio_of_wrong_parts} If the ratio of wrong parts to total number of parts is less than this - allow to start. Possible values: - Float, 0.0 - 1.0 search_orphaned_parts_disks {#search_orphaned_parts_disks}
{"source_file": "merge-tree-settings.md"}
[ -0.11213500797748566, 0.010932628996670246, -0.07448013126850128, 0.013554827310144901, 0.021196987479925156, -0.0576801523566246, -0.04724011942744255, -0.0394248403608799, 0.067111074924469, -0.01566430926322937, 0.05231765657663345, 0.020738691091537476, 0.04018542915582657, -0.04456790...
ce6f0630-4755-4376-936b-da536d5e34a3
If the ratio of wrong parts to total number of parts is less than this - allow to start. Possible values: - Float, 0.0 - 1.0 search_orphaned_parts_disks {#search_orphaned_parts_disks} ClickHouse scans all disks for orphaned parts upon any ATTACH or CREATE table in order to not allow to miss data parts at undefined (not included in policy) disks. Orphaned parts originates from potentially unsafe storage reconfiguration, e.g. if a disk was excluded from storage policy. This setting limits scope of disks to search by traits of the disks. Possible values: - any - scope is not limited. - local - scope is limited by local disks . - none - empty scope, do not search serialization_info_version {#serialization_info_version} Serialization info version used when writing serialization.json . This setting is required for compatibility during cluster upgrades. Possible values: - basic - Basic format. - with_types - Format with additional types_serialization_versions field, allowing per-type serialization versions. This makes settings like string_serialization_version effective. During rolling upgrades, set this to basic so that new servers produce data parts compatible with old servers. After the upgrade completes, switch to WITH_TYPES to enable per-type serialization versions. shared_merge_tree_activate_coordinated_merges_tasks {#shared_merge_tree_activate_coordinated_merges_tasks} Activates rescheduling of coordinated merges tasks. It can be useful even when shared_merge_tree_enable_coordinated_merges=0 because this will populate merge coordinator statistics and help with cold start. shared_merge_tree_create_per_replica_metadata_nodes {#shared_merge_tree_create_per_replica_metadata_nodes} Enables creation of per-replica /metadata and /columns nodes in ZooKeeper. Only available in ClickHouse Cloud shared_merge_tree_disable_merges_and_mutations_assignment {#shared_merge_tree_disable_merges_and_mutations_assignment} Stop merges assignment for shared merge tree. Only available in ClickHouse Cloud shared_merge_tree_empty_partition_lifetime {#shared_merge_tree_empty_partition_lifetime} How many seconds partition will be stored in keeper if it has no parts. shared_merge_tree_enable_automatic_empty_partitions_cleanup {#shared_merge_tree_enable_automatic_empty_partitions_cleanup} Enabled cleanup of Keeper entries of empty partition. shared_merge_tree_enable_coordinated_merges {#shared_merge_tree_enable_coordinated_merges} Enables coordinated merges strategy shared_merge_tree_enable_keeper_parts_extra_data {#shared_merge_tree_enable_keeper_parts_extra_data} Enables writing attributes into virtual parts and committing blocks in keeper shared_merge_tree_enable_outdated_parts_check {#shared_merge_tree_enable_outdated_parts_check} Enable outdated parts check. Only available in ClickHouse Cloud
{"source_file": "merge-tree-settings.md"}
[ -0.0035783909261226654, 0.0030779046937823296, -0.007347918581217527, -0.004232124425470829, 0.025862261652946472, -0.04795369133353233, -0.08981126546859741, -0.019821960479021072, -0.106936514377594, -0.02371813915669918, 0.07581563293933868, 0.02996491827070713, 0.056550003588199615, 0....
53a30562-e560-4e46-b3df-c970b66597c1
shared_merge_tree_enable_outdated_parts_check {#shared_merge_tree_enable_outdated_parts_check} Enable outdated parts check. Only available in ClickHouse Cloud shared_merge_tree_idle_parts_update_seconds {#shared_merge_tree_idle_parts_update_seconds} Interval in seconds for parts update without being triggered by ZooKeeper watch in the shared merge tree. Only available in ClickHouse Cloud shared_merge_tree_initial_parts_update_backoff_ms {#shared_merge_tree_initial_parts_update_backoff_ms} Initial backoff for parts update. Only available in ClickHouse Cloud shared_merge_tree_interserver_http_connection_timeout_ms {#shared_merge_tree_interserver_http_connection_timeout_ms} Timeouts for interserver HTTP connection. Only available in ClickHouse Cloud shared_merge_tree_interserver_http_timeout_ms {#shared_merge_tree_interserver_http_timeout_ms} Timeouts for interserver HTTP communication. Only available in ClickHouse Cloud shared_merge_tree_leader_update_period_random_add_seconds {#shared_merge_tree_leader_update_period_random_add_seconds} Add uniformly distributed value from 0 to x seconds to shared_merge_tree_leader_update_period to avoid thundering herd effect. Only available in ClickHouse Cloud shared_merge_tree_leader_update_period_seconds {#shared_merge_tree_leader_update_period_seconds} Maximum period to recheck leadership for parts update. Only available in ClickHouse Cloud shared_merge_tree_max_outdated_parts_to_process_at_once {#shared_merge_tree_max_outdated_parts_to_process_at_once} Maximum amount of outdated parts leader will try to confirm for removal at one HTTP request. Only available in ClickHouse Cloud. shared_merge_tree_max_parts_update_backoff_ms {#shared_merge_tree_max_parts_update_backoff_ms} Max backoff for parts update. Only available in ClickHouse Cloud shared_merge_tree_max_parts_update_leaders_in_total {#shared_merge_tree_max_parts_update_leaders_in_total} Maximum number of parts update leaders. Only available in ClickHouse Cloud shared_merge_tree_max_parts_update_leaders_per_az {#shared_merge_tree_max_parts_update_leaders_per_az} Maximum number of parts update leaders. Only available in ClickHouse Cloud shared_merge_tree_max_replicas_for_parts_deletion {#shared_merge_tree_max_replicas_for_parts_deletion} Max replicas which will participate in parts deletion (killer thread). Only available in ClickHouse Cloud shared_merge_tree_max_replicas_to_merge_parts_for_each_parts_range {#shared_merge_tree_max_replicas_to_merge_parts_for_each_parts_range} Max replicas which will try to assign potentially conflicting merges (allow to avoid redundant conflicts in merges assignment). 0 means disabled. Only available in ClickHouse Cloud shared_merge_tree_max_suspicious_broken_parts {#shared_merge_tree_max_suspicious_broken_parts} Max broken parts for SMT, if more - deny automatic detach.
{"source_file": "merge-tree-settings.md"}
[ 0.016529683023691177, -0.03438610956072807, 0.04711386561393738, -0.005909457802772522, 0.07087109237909317, -0.06783408671617508, -0.05667043477296829, -0.08163841813802719, 0.020358579233288765, 0.06314849853515625, 0.034786324948072433, -0.020724503323435783, -0.0395284928381443, -0.037...
6038ee49-6bb1-4531-b8e7-3a6d2a5d9db6
shared_merge_tree_max_suspicious_broken_parts {#shared_merge_tree_max_suspicious_broken_parts} Max broken parts for SMT, if more - deny automatic detach. shared_merge_tree_max_suspicious_broken_parts_bytes {#shared_merge_tree_max_suspicious_broken_parts_bytes} Max size of all broken parts for SMT, if more - deny automatic detach. shared_merge_tree_memo_ids_remove_timeout_seconds {#shared_merge_tree_memo_ids_remove_timeout_seconds} How long we store insert memoization ids to avoid wrong actions during insert retries. Only available in ClickHouse Cloud shared_merge_tree_merge_coordinator_election_check_period_ms {#shared_merge_tree_merge_coordinator_election_check_period_ms} Time between runs of merge coordinator election thread shared_merge_tree_merge_coordinator_factor {#shared_merge_tree_merge_coordinator_factor} Time changing factor for delay of coordinator thread shared_merge_tree_merge_coordinator_fetch_fresh_metadata_period_ms {#shared_merge_tree_merge_coordinator_fetch_fresh_metadata_period_ms} How often merge coordinator should sync with zookeeper to take fresh metadata shared_merge_tree_merge_coordinator_max_merge_request_size {#shared_merge_tree_merge_coordinator_max_merge_request_size} Number of merges that coordinator can request from MergerMutator at once shared_merge_tree_merge_coordinator_max_period_ms {#shared_merge_tree_merge_coordinator_max_period_ms} Maximum time between runs of merge coordinator thread shared_merge_tree_merge_coordinator_merges_prepare_count {#shared_merge_tree_merge_coordinator_merges_prepare_count} Number of merge entries that coordinator should prepare and distribute across workers shared_merge_tree_merge_coordinator_min_period_ms {#shared_merge_tree_merge_coordinator_min_period_ms} Minimum time between runs of merge coordinator thread shared_merge_tree_merge_worker_fast_timeout_ms {#shared_merge_tree_merge_worker_fast_timeout_ms} Timeout that merge worker thread will use if it is needed to update it's state after immediate action shared_merge_tree_merge_worker_regular_timeout_ms {#shared_merge_tree_merge_worker_regular_timeout_ms} Time between runs of merge worker thread shared_merge_tree_outdated_parts_group_size {#shared_merge_tree_outdated_parts_group_size} How many replicas will be in the same rendezvous hash group for outdated parts cleanup. Only available in ClickHouse Cloud. shared_merge_tree_partitions_hint_ratio_to_reload_merge_pred_for_mutations {#shared_merge_tree_partitions_hint_ratio_to_reload_merge_pred_for_mutations} Will reload merge predicate in merge/mutate selecting task when <candidate partitions for mutations only (partitions that cannot be merged)>/<candidate partitions for mutations> ratio is higher than the setting. Only available in ClickHouse Cloud shared_merge_tree_parts_load_batch_size {#shared_merge_tree_parts_load_batch_size}
{"source_file": "merge-tree-settings.md"}
[ -0.007702845148742199, -0.028660768643021584, -0.05444640293717384, 0.03088328056037426, 0.015102986246347427, 0.014799808152019978, -0.06587089598178864, -0.0008969242917373776, -0.01984512247145176, 0.046556901186704636, 0.07504052668809891, 0.010062257759273052, 0.05742094665765762, -0....
2c7f4835-83a0-4c5f-8002-8283da18c545
shared_merge_tree_parts_load_batch_size {#shared_merge_tree_parts_load_batch_size} Amount of fetch parts metadata jobs to schedule at once. Only available in ClickHouse Cloud shared_merge_tree_postpone_next_merge_for_locally_merged_parts_ms {#shared_merge_tree_postpone_next_merge_for_locally_merged_parts_ms} Time to keep a locally merged part without starting a new merge containing this part. Gives other replicas a chance fetch the part and start this merge. Only available in ClickHouse Cloud. shared_merge_tree_postpone_next_merge_for_locally_merged_parts_rows_threshold {#shared_merge_tree_postpone_next_merge_for_locally_merged_parts_rows_threshold} Minimum size of part (in rows) to postpone assigning a next merge just after merging it locally. Only available in ClickHouse Cloud. shared_merge_tree_range_for_merge_window_size {#shared_merge_tree_range_for_merge_window_size} Time to keep a locally merged part without starting a new merge containing this part. Gives other replicas a chance fetch the part and start this merge. Only available in ClickHouse Cloud shared_merge_tree_read_virtual_parts_from_leader {#shared_merge_tree_read_virtual_parts_from_leader} Read virtual parts from leader when possible. Only available in ClickHouse Cloud shared_merge_tree_try_fetch_part_in_memory_data_from_replicas {#shared_merge_tree_try_fetch_part_in_memory_data_from_replicas} If enabled all the replicas try to fetch part in memory data (like primary key, partition info and so on) from other replicas where it already exists. shared_merge_tree_update_replica_flags_delay_ms {#shared_merge_tree_update_replica_flags_delay_ms} How often replica will try to reload it's flags according to background schedule. shared_merge_tree_use_metadata_hints_cache {#shared_merge_tree_use_metadata_hints_cache} Enables requesting FS cache hints from in-memory cache on other replicas. Only available in ClickHouse Cloud shared_merge_tree_use_outdated_parts_compact_format {#shared_merge_tree_use_outdated_parts_compact_format} Use compact format for outdated parts: reduces load to Keeper, improves outdated parts processing. Only available in ClickHouse Cloud shared_merge_tree_use_too_many_parts_count_from_virtual_parts {#shared_merge_tree_use_too_many_parts_count_from_virtual_parts} If enabled too many parts counter will rely on shared data in Keeper, not on local replica state. Only available in ClickHouse Cloud shared_merge_tree_virtual_parts_discovery_batch {#shared_merge_tree_virtual_parts_discovery_batch} How many partition discoveries should be packed into batch simultaneous_parts_removal_limit {#simultaneous_parts_removal_limit} If there are a lot of outdated parts cleanup thread will try to delete up to simultaneous_parts_removal_limit parts during one iteration. simultaneous_parts_removal_limit set to 0 means unlimited.
{"source_file": "merge-tree-settings.md"}
[ 0.016586890444159508, -0.031474146991968155, 0.06584536284208298, -0.008539769798517227, 0.03615659847855568, -0.020720982924103737, -0.05310401692986488, -0.03706413134932518, 0.016882270574569702, -0.01123557984828949, 0.028696222230792046, -0.0066118692047894, -0.03235544636845589, -0.0...
dfdefac0-c76c-4b44-8a12-912159f142d1
simultaneous_parts_removal_limit parts during one iteration. simultaneous_parts_removal_limit set to 0 means unlimited. sleep_before_commit_local_part_in_replicated_table_ms {#sleep_before_commit_local_part_in_replicated_table_ms} For testing. Do not change it. sleep_before_loading_outdated_parts_ms {#sleep_before_loading_outdated_parts_ms} For testing. Do not change it. storage_policy {#storage_policy} Name of storage disk policy string_serialization_version {#string_serialization_version} Controls the serialization format for top-level String columns. This setting is only effective when serialization_info_version is set to "with_types". When enabled, top-level String columns are serialized with a separate .size subcolumn storing string lengths, rather than inline. This allows real .size subcolumns and can improve compression efficiency. Nested String types (e.g., inside Nullable , LowCardinality , Array , or Map ) are not affected, except when they appear in a Tuple . Possible values: single_stream — Use the standard serialization format with inline sizes. with_size_stream — Use a separate size stream for top-level String columns. table_disk {#table_disk} This is table disk, the path/endpoint should point to the table data, not to the database data. Can be set only for s3_plain/s3_plain_rewritable/web. temporary_directories_lifetime {#temporary_directories_lifetime} How many seconds to keep tmp_-directories. You should not lower this value because merges and mutations may not be able to work with low value of this setting. try_fetch_recompressed_part_timeout {#try_fetch_recompressed_part_timeout} Timeout (in seconds) before starting merge with recompression. During this time ClickHouse tries to fetch recompressed part from replica which assigned this merge with recompression. Recompression works slow in most cases, so we don't start merge with recompression until this timeout and trying to fetch recompressed part from replica which assigned this merge with recompression. Possible values: - Any positive integer. ttl_only_drop_parts {#ttl_only_drop_parts} Controls whether data parts are fully dropped in MergeTree tables when all rows in that part have expired according to their TTL settings. When ttl_only_drop_parts is disabled (by default), only the rows that have expired based on their TTL settings are removed. When ttl_only_drop_parts is enabled, the entire part is dropped if all rows in that part have expired according to their TTL settings. use_adaptive_write_buffer_for_dynamic_subcolumns {#use_adaptive_write_buffer_for_dynamic_subcolumns} Allow to use adaptive writer buffers during writing dynamic subcolumns to reduce memory usage use_async_block_ids_cache {#use_async_block_ids_cache} If true, we cache the hash sums of the async inserts. Possible values: - true - false
{"source_file": "merge-tree-settings.md"}
[ 0.021613435819745064, 0.032440152019262314, -0.02138350158929825, 0.021650590002536774, 0.005971967242658138, -0.08861706405878067, -0.09598797559738159, 0.007406497374176979, -0.026331691071391106, -0.00147442112211138, 0.031706299632787704, 0.04880494624376297, -0.0012576801236718893, -0...
5d6591ad-23e2-4092-9b91-c5991ea9c03b
use_async_block_ids_cache {#use_async_block_ids_cache} If true, we cache the hash sums of the async inserts. Possible values: - true - false A block bearing multiple async inserts will generate multiple hash sums. When some of the inserts are duplicated, keeper will only return one duplicated hash sum in one RPC, which will cause unnecessary RPC retries. This cache will watch the hash sums path in Keeper. If updates are watched in the Keeper, the cache will update as soon as possible, so that we are able to filter the duplicated inserts in the memory. use_compact_variant_discriminators_serialization {#use_compact_variant_discriminators_serialization} Enables compact mode for binary serialization of discriminators in Variant data type. This mode allows to use significantly less memory for storing discriminators in parts when there is mostly one variant or a lot of NULL values. use_const_adaptive_granularity {#use_const_adaptive_granularity} Always use constant granularity for whole part. It allows to compress in memory values of index granularity. It can be useful in extremely large workloads with thin tables. use_metadata_cache {#use_metadata_cache} Obsolete setting, does nothing. use_minimalistic_checksums_in_zookeeper {#use_minimalistic_checksums_in_zookeeper} Use small format (dozens bytes) for part checksums in ZooKeeper instead of ordinary ones (dozens KB). Before enabling check that all replicas support new format. use_minimalistic_part_header_in_zookeeper {#use_minimalistic_part_header_in_zookeeper} Storage method of the data parts headers in ZooKeeper. If enabled, ZooKeeper stores less data. For details, see here . use_primary_key_cache {#use_primary_key_cache} Use cache for primary index instead of saving all indexes in memory. Can be useful for very large tables vertical_merge_algorithm_min_bytes_to_activate {#vertical_merge_algorithm_min_bytes_to_activate} Minimal (approximate) uncompressed size in bytes in merging parts to activate Vertical merge algorithm. vertical_merge_algorithm_min_columns_to_activate {#vertical_merge_algorithm_min_columns_to_activate} Minimal amount of non-PK columns to activate Vertical merge algorithm. vertical_merge_algorithm_min_rows_to_activate {#vertical_merge_algorithm_min_rows_to_activate} Minimal (approximate) sum of rows in merging parts to activate Vertical merge algorithm. vertical_merge_optimize_lightweight_delete {#vertical_merge_optimize_lightweight_delete} If true, lightweight delete is optimized on vertical merge. vertical_merge_remote_filesystem_prefetch {#vertical_merge_remote_filesystem_prefetch} If true prefetching of data from remote filesystem is used for the next column during merge wait_for_unique_parts_send_before_shutdown_ms {#wait_for_unique_parts_send_before_shutdown_ms}
{"source_file": "merge-tree-settings.md"}
[ -0.03704366087913513, 0.012389752082526684, -0.062669537961483, 0.022913893684744835, -0.0007429872639477253, -0.021323049440979958, 0.03633305802941322, -0.02632904425263405, 0.023783890530467033, -0.04378129169344902, -0.010901317000389099, 0.05894844979047775, 0.03895464539527893, -0.06...
60354c9a-fde1-48e3-9ef7-f0b5622d059f
If true prefetching of data from remote filesystem is used for the next column during merge wait_for_unique_parts_send_before_shutdown_ms {#wait_for_unique_parts_send_before_shutdown_ms} Before shutdown table will wait for required amount time for unique parts (exist only on current replica) to be fetched by other replicas (0 means disabled). write_ahead_log_bytes_to_fsync {#write_ahead_log_bytes_to_fsync} Obsolete setting, does nothing. write_ahead_log_interval_ms_to_fsync {#write_ahead_log_interval_ms_to_fsync} Obsolete setting, does nothing. write_ahead_log_max_bytes {#write_ahead_log_max_bytes} Obsolete setting, does nothing. write_final_mark {#write_final_mark} Obsolete setting, does nothing. write_marks_for_substreams_in_compact_parts {#write_marks_for_substreams_in_compact_parts} Enables writing marks per each substream instead of per each column in Compact parts. It allows to read individual subcolumns from the data part efficiently. For example, column t Tuple(a String, b UInt32, c Array(Nullable(UInt32))) is serialized in the next substreams: - t.a for String data of tuple element a - t.b for UInt32 data of tuple element b - t.c.size0 for array sizes of tuple element c - t.c.null for null map of nested array elements of tuple element c - t.c for UInt32 data pf nested array elements of tuple element c When this setting is enabled, we will write a mark for each of these 5 substreams, which means that we will be able to read the data of each individual substream from the granule separately if needed. For example, if we want to read the subcolumn t.c we will read only data of substreams t.c.size0 , t.c.null and t.c and won't read data from substreams t.a and t.b . When this setting is disabled, we will write a mark only for top-level column t , which means that we will always read the whole column data from the granule, even if we need only data of some substreams. zero_copy_concurrent_part_removal_max_postpone_ratio {#zero_copy_concurrent_part_removal_max_postpone_ratio} Max percentage of top level parts to postpone removal in order to get smaller independent ranges. Recommended not to change. zero_copy_concurrent_part_removal_max_split_times {#zero_copy_concurrent_part_removal_max_split_times} Max recursion depth for splitting independent Outdated parts ranges into smaller subranges. Recommended not to change. zero_copy_merge_mutation_min_parts_size_sleep_before_lock {#zero_copy_merge_mutation_min_parts_size_sleep_before_lock} If zero copy replication is enabled sleep random amount of time before trying to lock depending on parts size for merge or mutation zero_copy_merge_mutation_min_parts_size_sleep_no_scale_before_lock {#zero_copy_merge_mutation_min_parts_size_sleep_no_scale_before_lock} If zero copy replication is enabled sleep random amount of time up to 500ms before trying to lock for merge or mutation.
{"source_file": "merge-tree-settings.md"}
[ -0.006541278678923845, -0.0023074925411492586, -0.04289969801902771, 0.024947429075837135, 0.019130930304527283, -0.05569161847233772, -0.06001932919025421, 0.10401950031518936, -0.03002612106502056, 0.07300447672605515, -0.002533476334065199, 0.07126367837190628, -0.006751947104930878, -0...
f821cb00-0960-4f0b-9d1c-9350fa821ead
If zero copy replication is enabled sleep random amount of time up to 500ms before trying to lock for merge or mutation. zookeeper_session_expiration_check_period {#zookeeper_session_expiration_check_period} ZooKeeper session expiration check period, in seconds. Possible values: - Any positive integer.
{"source_file": "merge-tree-settings.md"}
[ -0.03395978733897209, -0.0169528778642416, -0.0414714440703392, -0.01076028123497963, 0.044779155403375626, -0.07122280448675156, 0.00010655886580934748, -0.01334240660071373, 0.048665232956409454, 0.04898477718234062, 0.026920294389128685, -0.026997871696949005, 0.00991881638765335, 0.021...
d95fc32f-3a49-406c-bfee-81b60cdacaac
description: 'Constraints on settings can be defined in the profiles section of the user.xml configuration file and prohibit users from changing some of the settings with the SET query.' sidebar_label: 'Constraints on settings' sidebar_position: 62 slug: /operations/settings/constraints-on-settings title: 'Constraints on settings' doc_type: 'reference' Constraints on settings Overview {#overview} In ClickHouse, "constraints" on settings refer to limitations and rules which you can assign to settings. These constraints can be applied to maintain stability, security and predictable behavior of your database. Defining constraints {#defining-constraints} Constraints on settings can be defined in the profiles section of the user.xml configuration file. They prohibit users from changing some settings using the SET statement. Constraints are defined as follows: xml <profiles> <user_name> <constraints> <setting_name_1> <min>lower_boundary</min> </setting_name_1> <setting_name_2> <max>upper_boundary</max> </setting_name_2> <setting_name_3> <min>lower_boundary</min> <max>upper_boundary</max> </setting_name_3> <setting_name_4> <readonly/> </setting_name_4> <setting_name_5> <min>lower_boundary</min> <max>upper_boundary</max> <changeable_in_readonly/> </setting_name_5> <setting_name_6> <min>lower_boundary</min> <max>upper_boundary</max> <disallowed>value1</disallowed> <disallowed>value2</disallowed> <disallowed>value3</disallowed> <changeable_in_readonly/> </setting_name_6> </constraints> </user_name> </profiles> If the user tries to violate the constraints, an exception is thrown and the setting remains unchanged. Types of constraints {#types-of-constraints} There are a few types of constraints supported in ClickHouse: - min - max - disallowed - readonly (with alias const ) - changeable_in_readonly The min and max constraints specify upper and lower boundaries for a numeric setting and can be used in combination with each other. The disallowed constraint can be used to specify specific value(s) which should not be allowed for a specific setting. The readonly or const constraint specifies that the user cannot change the corresponding setting at all. The changeable_in_readonly constraint type allows users to change the setting within the min / max range even if the readonly setting is set to 1 , otherwise settings are not allowed to be changed in readonly=1 mode. :::note changeable_in_readonly is supported only if settings_constraints_replace_previous is enabled: xml <access_control_improvements> <settings_constraints_replace_previous>true</settings_constraints_replace_previous> </access_control_improvements> :::
{"source_file": "constraints-on-settings.md"}
[ 0.03301476687192917, 0.016140161082148552, -0.06757163256406784, 0.013981472700834274, -0.09882811456918716, 0.029376788064837456, 0.01142145972698927, 0.034902364015579224, -0.19857759773731232, -0.0658736452460289, 0.007602585479617119, -0.02299675904214382, 0.12932521104812622, -0.06540...
09989e0e-faf2-4a59-8a5f-40de27ae2564
is enabled: xml <access_control_improvements> <settings_constraints_replace_previous>true</settings_constraints_replace_previous> </access_control_improvements> ::: Multiple constraint profiles {#multiple-constraint-profiles} If there are multiple profiles active for a user, then constraints are merged. The Merge process depends on settings_constraints_replace_previous : - true (recommended): constraints for the same setting are replaced during merge, such that the last constraint is used and all previous ones are ignored. This includes fields that are not set in new constraint. - false (default): constraints for the same setting are merged in a way that every unset type of constraint is taken from the previous profile and every set type of constraint is replaced by the value from the new profile. Read-only mode {#read-only} Read-only mode is enabled by the readonly setting which is not to be confused with the readonly constraint type: - readonly=0 : No read-only restrictions. - readonly=1 : Only read queries are allowed and settings cannot be changed unless changeable_in_readonly is set. - readonly=2 : Only read queries are allowed, but settings can be changed, except for readonly setting itself. Example {#example-read-only} Let users.xml include the following lines: xml <profiles> <default> <max_memory_usage>10000000000</max_memory_usage> <force_index_by_date>0</force_index_by_date> ... <constraints> <max_memory_usage> <min>5000000000</min> <max>20000000000</max> </max_memory_usage> <force_index_by_date> <readonly/> </force_index_by_date> </constraints> </default> </profiles> The following queries will all throw exceptions: sql SET max_memory_usage=20000000001; SET max_memory_usage=4999999999; SET force_index_by_date=1; text Code: 452, e.displayText() = DB::Exception: Setting max_memory_usage should not be greater than 20000000000. Code: 452, e.displayText() = DB::Exception: Setting max_memory_usage should not be less than 5000000000. Code: 452, e.displayText() = DB::Exception: Setting force_index_by_date should not be changed. :::note The default profile is handled uniquely: all the constraints defined for the default profile become the default constraints, so they restrict all the users until they're overridden explicitly for those users. ::: Constraints on MergeTree settings {#constraints-on-merge-tree-settings} It is possible to set constraints for merge tree settings . These constraints are applied when a table with the MergeTree engine is created or its storage settings are altered. The name of merge tree setting must be prepended by merge_tree_ prefix when referenced in the <constraints> section. Example {#example-mergetree} You can forbid creating new tables with explicitly specified storage_policy
{"source_file": "constraints-on-settings.md"}
[ 0.05058244243264198, -0.011659697629511356, -0.06408273428678513, 0.06585358083248138, -0.028848586603999138, 0.03396027535200119, 0.022776998579502106, 0.006915121339261532, -0.09551627188920975, -0.027661172673106194, 0.06408326327800751, 0.05906861275434494, 0.07728435099124908, -0.0642...
39a57d64-e11f-4439-a754-c21e6e9ea93b
Example {#example-mergetree} You can forbid creating new tables with explicitly specified storage_policy xml <profiles> <default> <constraints> <merge_tree_storage_policy> <const/> </merge_tree_storage_policy> </constraints> </default> </profiles>
{"source_file": "constraints-on-settings.md"}
[ 0.03286522626876831, -0.04478565603494644, -0.09010348469018936, 0.024885013699531555, -0.02460598759353161, -0.042166899889707565, -0.0255704615265131, 0.028593290597200394, -0.09537485986948013, 0.07777310162782669, 0.08768431097269058, -0.0592547208070755, 0.1321098357439041, -0.0233971...
e77fd567-0dba-4e8a-9f2e-9eafa99f3417
description: 'An experimental technique intended to allow to set more flexible memory limits for queries.' slug: /operations/settings/memory-overcommit title: 'Memory overcommit' doc_type: 'reference' Memory overcommit Memory overcommit is an experimental technique intended to allow to set more flexible memory limits for queries. The idea of this technique is to introduce settings which can represent guaranteed amount of memory a query can use. When memory overcommit is enabled and the memory limit is reached ClickHouse will select the most overcommitted query and try to free memory by killing this query. When memory limit is reached any query will wait some time during attempt to allocate new memory. If timeout is passed and memory is freed, the query continues execution. Otherwise an exception will be thrown and the query is killed. Selection of query to stop or kill is performed by either global or user overcommit trackers depending on what memory limit is reached. If overcommit tracker can't choose query to stop, MEMORY_LIMIT_EXCEEDED exception is thrown. User overcommit tracker {#user-overcommit-tracker} User overcommit tracker finds a query with the biggest overcommit ratio in the user's query list. Overcommit ratio for a query is computed as number of allocated bytes divided by value of memory_overcommit_ratio_denominator_for_user setting. If memory_overcommit_ratio_denominator_for_user for the query is equals to zero, overcommit tracker won't choose this query. Waiting timeout is set by memory_usage_overcommit_max_wait_microseconds setting. Example sql SELECT number FROM numbers(1000) GROUP BY number SETTINGS memory_overcommit_ratio_denominator_for_user=4000, memory_usage_overcommit_max_wait_microseconds=500 Global overcommit tracker {#global-overcommit-tracker} Global overcommit tracker finds a query with the biggest overcommit ratio in the list of all queries. In this case overcommit ratio is computed as number of allocated bytes divided by value of memory_overcommit_ratio_denominator setting. If memory_overcommit_ratio_denominator for the query is equals to zero, overcommit tracker won't choose this query. Waiting timeout is set by memory_usage_overcommit_max_wait_microseconds parameter in the configuration file.
{"source_file": "memory-overcommit.md"}
[ -0.005950729828327894, 0.01436699740588665, -0.07238668948411942, 0.060379549860954285, -0.0184768196195364, -0.030419761314988136, 0.04908246919512749, 0.05382118746638298, -0.019680103287100792, 0.047590576112270355, 0.021291177719831467, 0.07906630635261536, 0.044602178037166595, -0.088...
28252dd8-da32-466c-a6f0-009f7a300c30
description: 'Table of Contents page for Settings' sidebar_position: 1 slug: /operations/settings/ title: 'Settings' doc_type: 'landing-page'
{"source_file": "index.md"}
[ 0.030125418677926064, 0.0011012483155354857, 0.01080603152513504, 0.018186796456575394, -0.023157788440585136, 0.014174268580973148, -0.018642930313944817, 0.0581742599606514, -0.08492475748062134, 0.05535976588726044, -0.026475220918655396, 0.03237980231642723, 0.06092185899615288, -0.020...
764f8ed9-fe2e-4c64-bd01-2e3c69427b00
description: 'TCP connection limits.' sidebar_label: 'TCP connection limits' slug: /operations/settings/tcp-connection-limits title: 'TCP connection limits' doc_type: 'reference' TCP connection limits Overview {#overview} You may have a ClickHouse TCP connection (i.e., one through the command-line client ) disconnect automatically after some number of queries or duration. After disconnecting, no automatic reconnection occurs (unless triggered through something else, such as sending another query in the command-line client). Connection limits are enabled by setting the server settings tcp_close_connection_after_queries_num (for the query limit) or tcp_close_connection_after_queries_seconds (for the duration limit) to greater than 0. If both limits are enabled, the connection closes when either limit is hit first. Upon hitting a limit and disconnecting, the client receives a TCP_CONNECTION_LIMIT_REACHED exception, and the query that causes the disconnect is never processed . Query limits {#query-limits} Assuming tcp_close_connection_after_queries_num is set to N, then the connection allows N successful queries. Then on query N + 1, the client disconnects. Every query processed counts towards the query limit. So when connecting a command-line client, there may be an automatic initial system warnings query which counts towards the limit. When a TCP connection is idle (i.e., has not processed queries for some duration of time, specified by the session setting poll_interval ), the number of queries counted so far resets to 0. This means the number of total queries in a single connection can exceed tcp_close_connection_after_queries_num if idle occurs. Duration limits {#duration-limits} The connection duration is measured starting as soon as the client connects. The client is disconnected on the first query after tcp_close_connection_after_queries_seconds seconds has passed.
{"source_file": "tcp-connection-limits.md"}
[ -0.008446021936833858, -0.04132697358727455, -0.014793689362704754, 0.04733789339661598, -0.10718898475170135, -0.01737995073199272, 0.07524619251489639, -0.009282566606998444, 0.028511272743344307, -0.016995523124933243, -0.016424527391791344, -0.0026344743091613054, 0.07039660960435867, ...
50f53296-9038-4943-96e6-ca2db267c1bb
description: 'Settings for query permissions.' sidebar_label: 'Permissions for queries' sidebar_position: 58 slug: /operations/settings/permissions-for-queries title: 'Permissions for queries' doc_type: 'reference' Permissions for queries Queries in ClickHouse can be divided into several types: Read data queries: SELECT , SHOW , DESCRIBE , EXISTS . Write data queries: INSERT , OPTIMIZE . Change settings query: SET , USE . DDL queries: CREATE , ALTER , RENAME , ATTACH , DETACH , DROP TRUNCATE . KILL QUERY . The following settings regulate user permissions by the type of query: readonly {#readonly} Restricts permissions for read data, write data, and change settings queries. When set to 1, allows: All types of read queries (like SELECT and equivalent queries). Queries that modify only session context (like USE). When set to 2, allows the above plus: - SET and CREATE TEMPORARY TABLE :::tip Queries like EXISTS, DESCRIBE, EXPLAIN, SHOW PROCESSLIST, etc are equivalent to SELECT, because they just do select from system tables. ::: Possible values: 0 — Read, Write, and Change settings queries are allowed. 1 — Only Read data queries are allowed. 2 — Read data and Change settings queries are allowed. Default value: 0 :::note After setting readonly = 1 , the user can't change readonly and allow_ddl settings in the current session. When using the GET method in the HTTP interface , readonly = 1 is set automatically. To modify data, use the POST method. Setting readonly = 1 prohibits the user from changing settings. There is a way to prohibit the user from changing only specific settings. Also there is a way to allow changing only specific settings under readonly = 1 restrictions. For details see constraints on settings . ::: allow_ddl {#allow_ddl} Allows or denies DDL queries. Possible values: 0 — DDL queries are not allowed. 1 — DDL queries are allowed. Default value: 1 :::note You cannot run SET allow_ddl = 1 if allow_ddl = 0 for the current session. ::: :::note KILL QUERY KILL QUERY can be performed with any combination of readonly and allow_ddl settings. :::
{"source_file": "permissions-for-queries.md"}
[ -0.0025613366160541773, -0.05041666701436043, -0.09106718748807907, 0.0735434889793396, -0.07805707305669785, -0.026207251474261284, 0.08963853865861893, -0.009042277932167053, -0.03323911130428314, 0.029510140419006348, 0.01455972995609045, 0.02213304117321968, 0.04957438260316849, -0.034...
84cfefd3-7a08-4a40-83a1-99d4257931a4
description: 'This section contains descriptions of server settings i.e settings which cannot be changed at the session or query level.' keywords: ['global server settings'] sidebar_label: 'Server Settings' sidebar_position: 57 slug: /operations/server-configuration-parameters/settings title: 'Server Settings' doc_type: 'reference' import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import SystemLogParameters from '@site/docs/operations/server-configuration-parameters/_snippets/_system-log-parameters.md'; import SettingsInfoBlock from '@theme/SettingsInfoBlock/SettingsInfoBlock'; Server Settings This section contains descriptions of server settings. These are settings which cannot be changed at the session or query level. For more information on configuration files in ClickHouse see ""Configuration Files"" . Other settings are described in the "" Settings "" section. Before studying the settings, we recommend reading the Configuration files section and note the use of substitutions (the incl and optional attributes). abort_on_logical_error {#abort_on_logical_error} Crash the server on LOGICAL_ERROR exceptions. Only for experts. access_control_improvements {#access_control_improvements} Settings for optional improvements in the access control system.
{"source_file": "settings.md"}
[ 0.018360106274485588, 0.022428538650274277, -0.0590536966919899, 0.009884408675134182, -0.030781619250774384, -0.0012968459632247686, 0.06030075624585152, 0.00206425110809505, -0.09709780663251877, 0.008210886269807816, 0.0330042764544487, 0.036614637821912766, 0.045735880732536316, -0.034...
01be0164-cf5b-480e-8f2e-af56f1f4ac3d
| Setting | Description | Default | |-------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| | users_without_row_policies_can_read_rows | Sets whether users without permissive row policies can still read rows using a SELECT query. For example, if there are two users A and B and a row policy is defined only for A, then if this setting is true, user B will see all rows. If this setting is false, user B will see no rows. | true | | on_cluster_queries_require_cluster_grant | Sets whether ON CLUSTER queries require the CLUSTER grant. | true | | select_from_system_db_requires_grant | Sets whether SELECT * FROM system.<table> requires any grants and can be executed by any user. If set to true then this query requires GRANT SELECT ON system.<table> just as for non-system tables. Exceptions: a few system tables ( tables , columns , databases , and some constant tables like one , contributors ) are still accessible for everyone; and if there is a SHOW privilege (e.g. SHOW USERS ) granted then the corresponding system table (i.e. system.users ) will be accessible. | true | | select_from_information_schema_requires_grant | Sets whether SELECT * FROM information_schema.<table>
{"source_file": "settings.md"}
[ 0.02712794952094555, 0.04274369403719902, -0.006541161797940731, -0.007242037449032068, -0.060901835560798645, 0.07167726010084152, 0.012856175191700459, 0.04759989306330681, 0.0283141378313303, -0.05707637965679169, 0.021467838436365128, -0.04857417568564415, -0.025479990988969803, -0.050...
993e8033-619e-4d1d-b2b7-dd60d33f3873
system.users ) will be accessible. | true | | select_from_information_schema_requires_grant | Sets whether SELECT * FROM information_schema.<table> requires any grants and can be executed by any user. If set to true, then this query requires GRANT SELECT ON information_schema.<table> , just as for ordinary tables. | true | | settings_constraints_replace_previous | Sets whether a constraint in a settings profile for some setting will cancel actions of the previous constraint (defined in other profiles) for that setting, including fields which are not set by the new constraint. It also enables the changeable_in_readonly constraint type. | true | | table_engines_require_grant | Sets whether creating a table with a specific table engine requires a grant. | false | | role_cache_expiration_time_seconds | Sets the number of seconds since last access, that a role is stored in the Role Cache. | 600 |
{"source_file": "settings.md"}
[ 0.01694832369685173, 0.017655037343502045, -0.07618525624275208, 0.0692007914185524, -0.017760543152689934, 0.028467006981372833, 0.01628698967397213, -0.018976176157593727, -0.1034649908542633, -0.008709846995770931, 0.00023489973682444543, 0.015882790088653564, 0.05214175581932068, -0.05...
876136ce-187d-46ac-81b0-a8ae2d35865c
Example: xml <access_control_improvements> <users_without_row_policies_can_read_rows>true</users_without_row_policies_can_read_rows> <on_cluster_queries_require_cluster_grant>true</on_cluster_queries_require_cluster_grant> <select_from_system_db_requires_grant>true</select_from_system_db_requires_grant> <select_from_information_schema_requires_grant>true</select_from_information_schema_requires_grant> <settings_constraints_replace_previous>true</settings_constraints_replace_previous> <table_engines_require_grant>false</table_engines_require_grant> <role_cache_expiration_time_seconds>600</role_cache_expiration_time_seconds> </access_control_improvements> access_control_path {#access_control_path} Path to a folder where a ClickHouse server stores user and role configurations created by SQL commands. See also Access Control and Account Management aggregate_function_group_array_action_when_limit_is_reached {#aggregate_function_group_array_action_when_limit_is_reached} Action to execute when max array element size is exceeded in groupArray: throw exception, or discard extra values aggregate_function_group_array_max_element_size {#aggregate_function_group_array_max_element_size} Max array element size in bytes for groupArray function. This limit is checked at serialization and help to avoid large state size. allow_feature_tier {#allow_feature_tier} Controls if the user can change settings related to the different feature tiers. 0 - Changes to any setting are allowed (experimental, beta, production). 1 - Only changes to beta and production feature settings are allowed. Changes to experimental settings are rejected. 2 - Only changes to production settings are allowed. Changes to experimental or beta settings are rejected. This is equivalent to setting a readonly constraint on all EXPERIMENTAL / BETA features. :::note A value of 0 means that all settings can be changed. ::: allow_impersonate_user {#allow_impersonate_user} Enable/disable the IMPERSONATE feature (EXECUTE AS target_user). allow_implicit_no_password {#allow_implicit_no_password} Forbids creating a user with no password unless 'IDENTIFIED WITH no_password' is explicitly specified. xml <allow_implicit_no_password>1</allow_implicit_no_password> allow_no_password {#allow_no_password} Sets whether an insecure password type of no_password is allowed or not. xml <allow_no_password>1</allow_no_password> allow_plaintext_password {#allow_plaintext_password} Sets whether plaintext-password types (insecure) are allowed or not. xml <allow_plaintext_password>1</allow_plaintext_password> allow_use_jemalloc_memory {#allow_use_jemalloc_memory} Allows to use jemalloc memory. allowed_disks_for_table_engines {#allowed_disks_for_table_engines} List of disks allowed for use with Iceberg async_insert_queue_flush_on_shutdown {#async_insert_queue_flush_on_shutdown}
{"source_file": "settings.md"}
[ 0.02387596294283867, -0.01799188368022442, -0.13801835477352142, 0.10545829683542252, -0.07041164487600327, 0.019551655277609825, 0.08959347009658813, -0.06347770243883133, -0.03998934105038643, 0.03365490585565567, 0.059297703206539154, -0.020574918016791344, 0.08773915469646454, -0.07191...
3030cad3-c908-4d1d-a26f-c581676f81b2
allowed_disks_for_table_engines {#allowed_disks_for_table_engines} List of disks allowed for use with Iceberg async_insert_queue_flush_on_shutdown {#async_insert_queue_flush_on_shutdown} If true queue of asynchronous inserts is flushed on graceful shutdown async_insert_threads {#async_insert_threads} Maximum number of threads to actually parse and insert data in background. Zero means asynchronous mode is disabled async_load_databases {#async_load_databases} Asynchronous loading of databases and tables. If true all non-system databases with Ordinary , Atomic and Replicated engine will be loaded asynchronously after the ClickHouse server start up. See system.asynchronous_loader table, tables_loader_background_pool_size and tables_loader_foreground_pool_size server settings. Any query that tries to access a table, that is not yet loaded, will wait for exactly this table to be started up. If load job fails, query will rethrow an error (instead of shutting down the whole server in case of async_load_databases = false ). The table that is waited for by at least one query will be loaded with higher priority. DDL queries on a database will wait for exactly that database to be started up. Also consider setting a limit max_waiting_queries for the total number of waiting queries. If false , all databases are loaded when the server starts. Example xml <async_load_databases>true</async_load_databases> async_load_system_database {#async_load_system_database} Asynchronous loading of system tables. Helpful if there is a high amount of log tables and parts in the system database. Independent of the async_load_databases setting. If set to true , all system databases with Ordinary , Atomic , and Replicated engines will be loaded asynchronously after the ClickHouse server starts. See system.asynchronous_loader table, tables_loader_background_pool_size and tables_loader_foreground_pool_size server settings. Any query that tries to access a system table, that is not yet loaded, will wait for exactly this table to be started up. The table that is waited for by at least one query will be loaded with higher priority. Also consider setting the max_waiting_queries setting to limit the total number of waiting queries. If set to false , system database loads before server start. Example xml <async_load_system_database>true</async_load_system_database> asynchronous_heavy_metrics_update_period_s {#asynchronous_heavy_metrics_update_period_s} Period in seconds for updating heavy asynchronous metrics. asynchronous_insert_log {#asynchronous_insert_log} Settings for the asynchronous_insert_log system table for logging async inserts. Example
{"source_file": "settings.md"}
[ -0.024496911093592644, -0.03815675154328346, -0.09041335433721542, 0.09549051523208618, -0.03926188126206398, -0.06774545460939407, -0.028003333136439323, -0.03449682891368866, 0.03830099105834961, 0.0200051199644804, 0.029740607365965843, 0.07708606868982315, 0.019186170771718025, -0.0864...
6e25cd0b-3f62-492f-a26b-eb0d9c530042
asynchronous_insert_log {#asynchronous_insert_log} Settings for the asynchronous_insert_log system table for logging async inserts. Example xml <clickhouse> <asynchronous_insert_log> <database>system</database> <table>asynchronous_insert_log</table> <flush_interval_milliseconds>7500</flush_interval_milliseconds> <partition_by>toYYYYMM(event_date)</partition_by> <max_size_rows>1048576</max_size_rows> <reserved_size_rows>8192</reserved_size_rows> <buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold> <flush_on_crash>false</flush_on_crash> <!-- <engine>Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + INTERVAL 30 day</engine> --> </asynchronous_insert_log> </clickhouse> asynchronous_metric_log {#asynchronous_metric_log} Enabled by default on ClickHouse Cloud deployments. If the setting is not enabled by default on your environment, depending on how ClickHouse was installed, you can follow the instruction below to enable or disable it. Enabling To manually turn on asynchronous metric logs history collection system.asynchronous_metric_log , create /etc/clickhouse-server/config.d/asynchronous_metric_log.xml with the following content: xml <clickhouse> <asynchronous_metric_log> <database>system</database> <table>asynchronous_metric_log</table> <flush_interval_milliseconds>7500</flush_interval_milliseconds> <collect_interval_milliseconds>1000</collect_interval_milliseconds> <max_size_rows>1048576</max_size_rows> <reserved_size_rows>8192</reserved_size_rows> <buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold> <flush_on_crash>false</flush_on_crash> </asynchronous_metric_log> </clickhouse> Disabling To disable asynchronous_metric_log setting, you should create the following file /etc/clickhouse-server/config.d/disable_asynchronous_metric_log.xml with the following content: xml <clickhouse><asynchronous_metric_log remove="1" /></clickhouse> asynchronous_metrics_enable_heavy_metrics {#asynchronous_metrics_enable_heavy_metrics} Enable the calculation of heavy asynchronous metrics. asynchronous_metrics_update_period_s {#asynchronous_metrics_update_period_s} Period in seconds for updating asynchronous metrics. auth_use_forwarded_address {#auth_use_forwarded_address} Use originating address for authentication for clients connected through proxy. :::note This setting should be used with extra caution since forwarded addresses can be easily spoofed - servers accepting such authentication should not be accessed directly but rather exclusively through a trusted proxy. ::: background_buffer_flush_schedule_pool_size {#background_buffer_flush_schedule_pool_size} The maximum number of threads that will be used for performing flush operations for Buffer-engine tables in the background.
{"source_file": "settings.md"}
[ 0.04461017996072769, -0.05652175098657608, -0.01597307249903679, 0.05465085059404373, -0.007696920074522495, -0.04914608225226402, -0.020751018077135086, 0.04968228191137314, 0.01589164510369301, 0.02802089974284172, 0.042193569242954254, -0.027421943843364716, 0.018470363691449165, -0.053...
9d456b70-0de4-4e46-af2b-b8feca53126d
The maximum number of threads that will be used for performing flush operations for Buffer-engine tables in the background. background_common_pool_size {#background_common_pool_size} The maximum number of threads that will be used for performing a variety of operations (mostly garbage collection) for *MergeTree-engine tables in the background. background_distributed_schedule_pool_size {#background_distributed_schedule_pool_size} The maximum number of threads that will be used for executing distributed sends. background_fetches_pool_size {#background_fetches_pool_size} The maximum number of threads that will be used for fetching data parts from another replica for *MergeTree-engine tables in the background. background_merges_mutations_concurrency_ratio {#background_merges_mutations_concurrency_ratio} Sets a ratio between the number of threads and the number of background merges and mutations that can be executed concurrently. For example, if the ratio equals to 2 and background_pool_size is set to 16 then ClickHouse can execute 32 background merges concurrently. This is possible, because background operations could be suspended and postponed. This is needed to give small merges more execution priority. :::note You can only increase this ratio at runtime. To lower it you have to restart the server. As with the background_pool_size setting background_merges_mutations_concurrency_ratio could be applied from the default profile for backward compatibility. ::: background_merges_mutations_scheduling_policy {#background_merges_mutations_scheduling_policy} The policy on how to perform a scheduling for background merges and mutations. Possible values are: round_robin and shortest_task_first . Algorithm used to select next merge or mutation to be executed by background thread pool. Policy may be changed at runtime without server restart. Could be applied from the default profile for backward compatibility. Possible values: round_robin — Every concurrent merge and mutation is executed in round-robin order to ensure starvation-free operation. Smaller merges are completed faster than bigger ones just because they have fewer blocks to merge. shortest_task_first — Always execute smaller merge or mutation. Merges and mutations are assigned priorities based on their resulting size. Merges with smaller sizes are strictly preferred over bigger ones. This policy ensures the fastest possible merge of small parts but can lead to indefinite starvation of big merges in partitions heavily overloaded by INSERT s. background_message_broker_schedule_pool_size {#background_message_broker_schedule_pool_size} The maximum number of threads that will be used for executing background operations for message streaming. background_move_pool_size {#background_move_pool_size}
{"source_file": "settings.md"}
[ -0.00013531299191527069, -0.06680969893932343, -0.008885395713150501, -0.06117534637451172, -0.04266241192817688, -0.11563912034034729, -0.06202086806297302, 0.002739212941378355, 0.01659921184182167, -0.002401514444500208, -0.03680502623319626, -0.0016725413734093308, -0.010492539033293724,...
52c9a77a-3ee9-4242-90f9-e0a2f0e8149e
The maximum number of threads that will be used for executing background operations for message streaming. background_move_pool_size {#background_move_pool_size} The maximum number of threads that will be used for moving data parts to another disk or volume for *MergeTree-engine tables in a background. background_pool_size {#background_pool_size} Sets the number of threads performing background merges and mutations for tables with MergeTree engines. :::note - This setting could also be applied at server startup from the default profile configuration for backward compatibility at the ClickHouse server start. - You can only increase the number of threads at runtime. - To lower the number of threads you have to restart the server. - By adjusting this setting, you manage CPU and disk load. ::: :::danger 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, such as: - number_of_free_entries_in_pool_to_lower_max_size_of_merge . - number_of_free_entries_in_pool_to_execute_mutation . - number_of_free_entries_in_pool_to_execute_optimize_entire_partition Example xml <background_pool_size>16</background_pool_size> background_schedule_pool_max_parallel_tasks_per_type_ratio {#background_schedule_pool_max_parallel_tasks_per_type_ratio} The maximum ratio of threads in the pool that can execute tasks of the same type simultaneously. background_schedule_pool_size {#background_schedule_pool_size} The maximum number of threads that will be used for constantly executing some lightweight periodic operations for replicated tables, Kafka streaming, and DNS cache updates. backup_log {#backup_log} Settings for the backup_log system table for logging BACKUP and RESTORE operations. Example xml <clickhouse> <backup_log> <database>system</database> <table>backup_log</table> <flush_interval_milliseconds>1000</flush_interval_milliseconds> <partition_by>toYYYYMM(event_date)</partition_by> <max_size_rows>1048576</max_size_rows> <reserved_size_rows>8192</reserved_size_rows> <buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold> <flush_on_crash>false</flush_on_crash> <!-- <engine>Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + INTERVAL 30 day</engine> --> </backup_log> </clickhouse> backup_threads {#backup_threads} The maximum number of threads to execute BACKUP requests. backups {#backups} Settings for backups, used when executing the BACKUP and RESTORE statements. The following settings can be configured by sub-tags:
{"source_file": "settings.md"}
[ 0.05436588451266289, -0.06928817927837372, -0.019795969128608704, -0.056776583194732666, -0.02062172070145607, -0.07472222298383713, -0.004829784855246544, 0.02026091143488884, 0.027920588850975037, -0.016962092369794846, -0.020166443660855293, 0.0011270507238805294, -0.03540321812033653, ...
52307bbe-235a-463d-9f75-ad2db85ff829
backups {#backups} Settings for backups, used when executing the BACKUP and RESTORE statements. The following settings can be configured by sub-tags: | Setting | Type | Description | Default | |:-|:-|:-|:-| | allow_concurrent_backups | Bool | Determines whether multiple backup operations can run concurrently on the same host. | true | | allow_concurrent_restores | Bool | Determines whether multiple restore operations can run concurrently on the same host. | true | | allowed_disk | String | Disk to backup to when using File() . This setting must be set in order to use File . | | | `allowed_path` | String | Path to backup to when using `File()`. This setting must be set in order to use `File`. | | | attempts_to_collect_metadata_before_sleep | UInt | Number of attempts to collect metadata before sleeping in case of inconsistency after comparing collected metadata. | 2 | | collect_metadata_timeout | UInt64 | Timeout in milliseconds for collecting metadata during backup. | 600000 | | compare_collected_metadata | Bool | If true, compares the collected metadata with the existing metadata to ensure they are not changed during backup . | true | | create_table_timeout | UInt64 | Timeout in milliseconds for creating tables during restore. | 300000 | | max_attempts_after_bad_version | UInt64 | Maximum number of attempts to retry after encountering a bad version error during coordinated backup/restore. | 3 | | max_sleep_before_next_attempt_to_collect_metadata | UInt64 | Maximum sleep time in milliseconds before the next attempt to collect metadata. | 100 | | min_sleep_before_next_attempt_to_collect_metadata | UInt64 | Minimum sleep time in milliseconds before the next attempt to collect metadata. | 5000 | | remove_backup_files_after_failure | Bool | If the BACKUP command fails, ClickHouse will try to remove the files already copied to the backup before the failure, otherwise it will leave the copied files as they are. | true | | sync_period_ms | UInt64 | Synchronization period in milliseconds for coordinated backup/restore. | 5000 | | test_inject_sleep | Bool | Testing related sleep | false | | test_randomize_order | Bool | If true, randomizes the order of certain operations for testing purposes. | false | | zookeeper_path | String | Path in ZooKeeper where backup and restore metadata is stored when using ON CLUSTER clause. | /clickhouse/backups | This setting is configured by default as: xml <backups> .... </backups> backups_io_thread_pool_queue_size {#backups_io_thread_pool_queue_size} The maximum number of jobs that can be scheduled on the Backups IO Thread pool. It is recommended to keep this queue unlimited due to the current S3 backup logic. :::note A value of 0 (default) means unlimited. ::: bcrypt_workfactor {#bcrypt_workfactor}
{"source_file": "settings.md"}
[ -0.03600925952196121, -0.03658164665102959, -0.08394947648048401, 0.03161944821476936, 0.03181308135390282, -0.07512493431568146, -0.08739232271909714, 0.03430325910449028, -0.028849385678768158, 0.03269645571708679, 0.029422147199511528, 0.024889742955565453, 0.06354926526546478, -0.09242...
f9221ddf-557a-4ebc-a954-29fc5b48b148
:::note A value of 0 (default) means unlimited. ::: bcrypt_workfactor {#bcrypt_workfactor} Work factor for the bcrypt_password authentication type which uses the Bcrypt algorithm . The work factor defines the amount of computations and time needed to compute the hash and verify the password. xml <bcrypt_workfactor>12</bcrypt_workfactor> :::warning For applications with high-frequency authentication, consider alternative authentication methods due to bcrypt's computational overhead at higher work factors. ::: blob_storage_log {#blob_storage_log} Settings for the blob_storage_log system table. Example: xml <blob_storage_log> <database>system</database <table>blob_storage_log</table <partition_by>toYYYYMM(event_date)</partition_by> <flush_interval_milliseconds>7500</flush_interval_milliseconds <ttl>event_date + INTERVAL 30 DAY</ttl> </blob_storage_log> builtin_dictionaries_reload_interval {#builtin_dictionaries_reload_interval} The interval in seconds before reloading built-in dictionaries. ClickHouse reloads built-in dictionaries every x seconds. This makes it possible to edit dictionaries "on the fly" without restarting the server. Example xml <builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval> cache_size_to_ram_max_ratio {#cache_size_to_ram_max_ratio} Set cache size to RAM max ratio. Allows lowering the cache size on low-memory systems. cannot_allocate_thread_fault_injection_probability {#cannot_allocate_thread_fault_injection_probability} For testing purposes. cgroups_memory_usage_observer_wait_time {#cgroups_memory_usage_observer_wait_time} Interval in seconds during which the server's maximum allowed memory consumption is adjusted by the corresponding threshold in cgroups. To disable the cgroup observer, set this value to 0 . compiled_expression_cache_elements_size {#compiled_expression_cache_elements_size} Sets the cache size (in elements) for compiled expressions . compiled_expression_cache_size {#compiled_expression_cache_size} Sets the cache size (in bytes) for compiled expressions . compression {#compression} Data compression settings for MergeTree -engine tables. :::note We recommend not changing this if you have just started using ClickHouse. ::: Configuration template : xml <compression> <case> <min_part_size>...</min_part_size> <min_part_size_ratio>...</min_part_size_ratio> <method>...</method> <level>...</level> </case> ... </compression> <case> fields : min_part_size – The minimum size of a data part. min_part_size_ratio – The ratio of the data part size to the table size. method – Compression method. Acceptable values: lz4 , lz4hc , zstd , deflate_qpl . level – Compression level. See Codecs . :::note You can configure multiple <case> sections. ::: Actions when conditions are met :
{"source_file": "settings.md"}
[ 0.005495391320437193, 0.020994111895561218, -0.1164206936955452, -0.014937411062419415, -0.03670196607708931, -0.012669870629906654, 0.0636734738945961, 0.056748807430267334, 0.04832923412322998, -0.02186845801770687, -0.01502230390906334, -0.03518670052289963, 0.09880591183900833, 0.00829...
dffb1c3e-ee2f-4691-b19e-f11dd2b6e1d4
level – Compression level. See Codecs . :::note You can configure multiple <case> sections. ::: Actions when conditions are met : If a data part matches a condition set, ClickHouse uses the specified compression method. If a data part matches multiple condition sets, ClickHouse uses the first matched condition set. :::note If no conditions are met for a data part, ClickHouse uses the lz4 compression. ::: Example xml <compression incl="clickhouse_compression"> <case> <min_part_size>10000000000</min_part_size> <min_part_size_ratio>0.01</min_part_size_ratio> <method>zstd</method> <level>1</level> </case> </compression> concurrent_threads_scheduler {#concurrent_threads_scheduler} The policy on how to perform a scheduling of CPU slots specified by concurrent_threads_soft_limit_num and concurrent_threads_soft_limit_ratio_to_cores . Algorithm used to govern how limited number of CPU slots are distributed among concurrent queries. Scheduler may be changed at runtime without server restart. Possible values: round_robin — Every query with setting use_concurrency_control = 1 allocates up to max_threads CPU slots. One slot per thread. On contention CPU slot are granted to queries using round-robin. Note that the first slot is granted unconditionally, which could lead to unfairness and increased latency of queries having high max_threads in presence of high number of queries with max_threads = 1. fair_round_robin — Every query with setting use_concurrency_control = 1 allocates up to max_threads - 1 CPU slots. Variation of round_robin that does not require a CPU slot for the first thread of every query. This way queries having max_threads = 1 do not require any slot and could not unfairly allocate all slots. There are no slots granted unconditionally. concurrent_threads_soft_limit_num {#concurrent_threads_soft_limit_num} The maximum number of query processing threads, excluding threads for retrieving data from remote servers, allowed to run all queries. This is not a hard limit. In case if the limit is reached the query will still get at least one thread to run. Query can upscale to desired number of threads during execution if more threads become available. :::note A value of 0 (default) means unlimited. ::: concurrent_threads_soft_limit_ratio_to_cores {#concurrent_threads_soft_limit_ratio_to_cores} Same as concurrent_threads_soft_limit_num , but with ratio to cores. config_reload_interval_ms {#config_reload_interval_ms} How often clickhouse will reload config and check for new changes core_dump {#core_dump} Configures soft limit for core dump file size. :::note Hard limit is configured via system tools ::: Example xml <core_dump> <size_limit>1073741824</size_limit> </core_dump> cpu_slot_preemption {#cpu_slot_preemption} Defines how workload scheduling for CPU resources (MASTER THREAD and WORKER THREAD) is done.
{"source_file": "settings.md"}
[ -0.06463127583265305, 0.057037353515625, -0.06339769065380096, 0.019538531079888344, -0.020073436200618744, -0.0785403773188591, -0.01734497770667076, -0.022635186091065407, -0.03900527581572533, -0.03431442379951477, 0.0036664220970124006, -0.018171394243836403, 0.042544104158878326, -0.0...
0cf9596b-b1da-4f73-b76c-1aef93fea1c0
cpu_slot_preemption {#cpu_slot_preemption} Defines how workload scheduling for CPU resources (MASTER THREAD and WORKER THREAD) is done. If true (recommended), accounting is done based on actual CPU time consumed. A fair number of CPU time would be allocated to competing workloads. Slots are allocated for a limited amount of time and re-requested after expiry. Slot requesting may block thread execution in case of CPU resource overload, i.e., preemption may happen. This ensures CPU-time fairness. If false (default), accounting is based on the number of CPU slots allocated. A fair number of CPU slots would be allocated to competing workloads. A slot is allocated when a thread starts, held continuously, and released when the thread ends execution. The number of threads allocated for query execution may only increase from 1 to max_threads and never decrease. This is more favorable to long-running queries and may lead to CPU starvation of short queries. Example xml <cpu_slot_preemption>true</cpu_slot_preemption> See Also - Workload Scheduling cpu_slot_preemption_timeout_ms {#cpu_slot_preemption_timeout_ms} It defines how many milliseconds could a worker thread wait during preemption, i.e. while waiting for another CPU slot to be granted. After this timeout, if thread was unable to acquire a new CPU slot it will exit and the query is scaled down to a lower number of concurrently executing threads dynamically. Note that master thread never downscaled, but could be preempted indefinitely. Makes sense only when cpu_slot_preemption is enabled and CPU resource is defined for WORKER THREAD. Example xml <cpu_slot_preemption_timeout_ms>1000</cpu_slot_preemption_timeout_ms> See Also - Workload Scheduling cpu_slot_quantum_ns {#cpu_slot_quantum_ns} It defines how many CPU nanoseconds a thread is allowed to consume after acquired a CPU slot and before it should request another CPU slot. Makes sense only if cpu_slot_preemption is enabled and CPU resource is defined for MASTER THREAD or WORKER THREAD. Example xml <cpu_slot_quantum_ns>10000000</cpu_slot_quantum_ns> See Also - Workload Scheduling crash_log {#crash_log} Settings for the crash_log system table operation. The following settings can be configured by sub-tags:
{"source_file": "settings.md"}
[ -0.022060038521885872, 0.011459138244390488, -0.030209455639123917, 0.034692488610744476, -0.05388510599732399, -0.05894740670919418, 0.0220656581223011, -0.020482297986745834, 0.0796966701745987, 0.009002210572361946, -0.003396834945306182, 0.024875978007912636, -0.043368276208639145, -0....
1f955627-3252-45b7-adb1-41f2d31d7c5f
| Setting | Description | Default | Note | |------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|--------------------------------------------------------------------------------------------------------------------| | database | Name of the database. | | | | table | Name of the system table. | | | | engine | MergeTree Engine Definition for a system table. | | Cannot be used if partition_by or order_by defined. If not specified MergeTree is selected by default | | partition_by | Custom partitioning key for a system table. | | If engine is specified for system table, partition_by parameter should be specified directly inside 'engine' | | ttl | Specifies the table TTL . | | If engine is specified for system table, ttl parameter should be specified directly inside 'engine' | | order_by | Custom sorting key for a system table. Can't be used if engine defined. | | If engine is specified for system table, order_by parameter should be specified directly inside 'engine' | | storage_policy | Name of the storage policy to use for the table (optional). | | If engine is specified for system table, storage_policy parameter should be specified directly inside 'engine' | | settings | Additional parameters that control the behavior of the MergeTree (optional). | | If engine is specified for system table, settings parameter should be specified directly inside 'engine' | | flush_interval_milliseconds
{"source_file": "settings.md"}
[ 0.021931346505880356, 0.04789365455508232, 0.009840734302997589, -0.00783087220042944, -0.05389880761504173, 0.06963074207305908, 0.020435001701116562, 0.05022745952010155, 0.023072700947523117, -0.046744488179683685, 0.02361503802239895, -0.04869977384805679, -0.03256634250283241, -0.0365...
1d536073-3daf-4c6a-a418-b00a97671fc8
engine is specified for system table, settings parameter should be specified directly inside 'engine' | | flush_interval_milliseconds | Interval for flushing data from the buffer in memory to the table. | 7500 | | | max_size_rows | Maximal size in lines for the logs. When the amount of non-flushed logs reaches the max_size, logs are dumped to the disk. | 1024 | | | reserved_size_rows | Pre-allocated memory size in lines for the logs. | 1024 | | | buffer_size_rows_flush_threshold | Threshold for amount of lines. If the threshold is reached, flushing logs to the disk is launched in background. | max_size_rows / 2 | | | flush_on_crash | Sets whether logs should be dumped to the disk in case of a crash. | false | |
{"source_file": "settings.md"}
[ 0.05215015634894371, -0.003218637080863118, -0.055169206112623215, 0.016664383932948112, -0.03549404442310333, -0.06777101010084152, -0.04898446798324585, 0.08127137273550034, -0.052395232021808624, 0.03625103831291199, 0.0024011624045670033, 0.027358507737517357, 0.0003977076557930559, -0...
29f280e2-6ad5-46a0-bfc6-0c01bfcf6378
The default server configuration file config.xml contains the following settings section: xml <crash_log> <database>system</database> <table>crash_log</table> <partition_by>toYYYYMM(event_date)</partition_by> <flush_interval_milliseconds>7500</flush_interval_milliseconds> <max_size_rows>1024</max_size_rows> <reserved_size_rows>1024</reserved_size_rows> <buffer_size_rows_flush_threshold>512</buffer_size_rows_flush_threshold> <flush_on_crash>false</flush_on_crash> </crash_log> custom_cached_disks_base_directory {#custom_cached_disks_base_directory} This setting specifies the cache path for custom (created from SQL) cached disks. custom_cached_disks_base_directory has higher priority for custom disks over filesystem_caches_path (found in filesystem_caches_path.xml ), which is used if the former one is absent. The filesystem cache setting path must lie inside that directory, otherwise an exception will be thrown preventing the disk from being created. :::note This will not affect disks created on an older version for which the server was upgraded. In this case, an exception will not be thrown, to allow the server to successfully start. ::: Example: xml <custom_cached_disks_base_directory>/var/lib/clickhouse/caches/</custom_cached_disks_base_directory> custom_settings_prefixes {#custom_settings_prefixes} List of prefixes for custom settings . The prefixes must be separated with commas. Example xml <custom_settings_prefixes>custom_</custom_settings_prefixes> See Also Custom settings database_atomic_delay_before_drop_table_sec {#database_atomic_delay_before_drop_table_sec} The delay during which a dropped table can be restored using the UNDROP statement. If DROP TABLE ran with a SYNC modifier, the setting is ignored. The default for this setting is 480 (8 minutes). database_catalog_drop_error_cooldown_sec {#database_catalog_drop_error_cooldown_sec} In case of a failed table drop, ClickHouse will wait for this time-out before retrying the operation. database_catalog_drop_table_concurrency {#database_catalog_drop_table_concurrency} The size of the threadpool used for dropping tables. database_catalog_unused_dir_cleanup_period_sec {#database_catalog_unused_dir_cleanup_period_sec} Parameter of a task that cleans up garbage from store/ directory. Sets scheduling period of the task. :::note A value of 0 means "never". The default value corresponds to 1 day. ::: database_catalog_unused_dir_hide_timeout_sec {#database_catalog_unused_dir_hide_timeout_sec} Parameter of a task that cleans up garbage from store/ directory. If some subdirectory is not used by clickhouse-server and this directory was not modified for last database_catalog_unused_dir_hide_timeout_sec seconds, the task will "hide" this directory by removing all access rights. It also works for directories that clickhouse-server does not expect to see inside store/ .
{"source_file": "settings.md"}
[ 0.06892554461956024, -0.03413079306483269, -0.0525689497590065, -0.010733459144830704, -0.016549689695239067, -0.052560869604349136, 0.006859130226075649, 0.10345961898565292, 0.03401568531990051, 0.03142579644918442, 0.057953499257564545, 0.07139924168586731, 0.002480977913364768, -0.0356...
4d506356-a08a-4756-a243-918cd7f41821
:::note A value of 0 means "immediately". ::: database_catalog_unused_dir_rm_timeout_sec {#database_catalog_unused_dir_rm_timeout_sec} Parameter of a task that cleans up garbage from store/ directory. If some subdirectory is not used by clickhouse-server and it was previously "hidden" (see database_catalog_unused_dir_hide_timeout_sec ) and this directory was not modified for last [ database_catalog_unused_dir_rm_timeout_sec ]/operations/server-configuration-parameters/settings#database_catalog_unused_dir_rm_timeout_sec) seconds, the task will remove this directory. It also works for directories that clickhouse-server does not expect to see inside store/ . :::note A value of 0 means "never". The default value corresponds to 30 days. ::: database_replicated_allow_detach_permanently {#database_replicated_allow_detach_permanently} Allow detaching tables permanently in Replicated databases database_replicated_drop_broken_tables {#database_replicated_drop_broken_tables} Drop unexpected tables from Replicated databases instead of moving them to a separate local database dead_letter_queue {#dead_letter_queue} Setting for the 'dead_letter_queue' system table. The default settings are: xml <dead_letter_queue> <database>system</database> <table>dead_letter</table> <partition_by>toYYYYMM(event_date)</partition_by> <flush_interval_milliseconds>7500</flush_interval_milliseconds> </dead_letter_queue> default_database {#default_database} The default database name. default_password_type {#default_password_type} Sets the password type to be automatically set for in queries like CREATE USER u IDENTIFIED BY 'p' . Accepted values are: - plaintext_password - sha256_password - double_sha1_password - bcrypt_password xml <default_password_type>sha256_password</default_password_type> default_profile {#default_profile} Default settings profile. Settings profiles are located in the file specified in the setting user_config . Example xml <default_profile>default</default_profile> default_replica_name {#default_replica_name} The replica name in ZooKeeper. Example xml <default_replica_name>{replica}</default_replica_name> default_replica_path {#default_replica_path} The path to the table in ZooKeeper. Example xml <default_replica_path>/clickhouse/tables/{uuid}/{shard}</default_replica_path> default_session_timeout {#default_session_timeout} Default session timeout, in seconds. xml <default_session_timeout>60</default_session_timeout> dictionaries_config {#dictionaries_config} The path to the config file for dictionaries. Path: Specify the absolute path or the path relative to the server config file. The path can contain wildcards * and ?. See also: - " Dictionaries ". Example xml <dictionaries_config>*_dictionary.xml</dictionaries_config> dictionaries_lazy_load {#dictionaries_lazy_load} Lazy loading of dictionaries.
{"source_file": "settings.md"}
[ -0.0016087598633021116, -0.0076408083550632, -0.07280360162258148, 0.06545194238424301, 0.030504409223794937, -0.06177607551217079, 0.06551817804574966, -0.06766781210899353, 0.0632685199379921, 0.015751030296087265, 0.135140061378479, 0.026060868054628372, 0.028615815564990044, 0.04454864...
123e1870-1aa5-43b7-82b1-ab8bea3e2434
See also: - " Dictionaries ". Example xml <dictionaries_config>*_dictionary.xml</dictionaries_config> dictionaries_lazy_load {#dictionaries_lazy_load} Lazy loading of dictionaries. If true , then each dictionary is loaded on the first use. If the loading is failed, the function that was using the dictionary throws an exception. If false , then the server loads all dictionaries at startup. :::note The server will wait at startup until all the dictionaries finish their loading before receiving any connections (exception: if wait_dictionaries_load_at_startup is set to false ). ::: Example xml <dictionaries_lazy_load>true</dictionaries_lazy_load> dictionary_background_reconnect_interval {#dictionary_background_reconnect_interval} Interval in milliseconds for reconnection attempts of failed MySQL and Postgres dictionaries having background_reconnect enabled. disable_insertion_and_mutation {#disable_insertion_and_mutation} Disable insert/alter/delete queries. This setting will be enabled if someone needs read-only nodes to prevent insertion and mutation affect reading performance. Inserts into external engines (S3, DataLake, MySQL, PostrgeSQL, Kafka, etc) are allowed despite this setting. disable_internal_dns_cache {#disable_internal_dns_cache} Disables the internal DNS cache. Recommended for operating ClickHouse in systems with frequently changing infrastructure such as Kubernetes. disable_tunneling_for_https_requests_over_http_proxy {#disable_tunneling_for_https_requests_over_http_proxy} By default, tunneling (i.e, HTTP CONNECT ) is used to make HTTPS requests over HTTP proxy. This setting can be used to disable it. no_proxy By default, all requests will go through the proxy. In order to disable it for specific hosts, the no_proxy variable must be set. It can be set inside the <proxy> clause for list and remote resolvers and as an environment variable for environment resolver. It supports IP addresses, domains, subdomains and '*' wildcard for full bypass. Leading dots are stripped just like curl does. Example The below configuration bypasses proxy requests to clickhouse.cloud and all of its subdomains (e.g, auth.clickhouse.cloud ). The same applies to GitLab, even though it has a leading dot. Both gitlab.com and about.gitlab.com would bypass the proxy. xml <proxy> <no_proxy>clickhouse.cloud,.gitlab.com</no_proxy> <http> <uri>http://proxy1</uri> <uri>http://proxy2:3128</uri> </http> <https> <uri>http://proxy1:3128</uri> </https> </proxy> disk_connections_soft_limit {#disk_connections_soft_limit} Connections above this limit have significantly shorter time to live. The limit applies to the disks connections. disk_connections_store_limit {#disk_connections_store_limit} Connections above this limit reset after use. Set to 0 to turn connection cache off. The limit applies to the disks connections.
{"source_file": "settings.md"}
[ 0.010467130690813065, -0.020344948396086693, -0.04702368006110191, 0.03351902589201927, -0.08947014063596725, -0.11657623201608658, -0.023125996813178062, -0.01549880113452673, -0.0070579261519014835, -0.0426986888051033, 0.04211548715829849, 0.0752725601196289, 0.045152127742767334, -0.06...
4134b78c-57cc-40e7-bd73-616cf9897dcf
disk_connections_store_limit {#disk_connections_store_limit} Connections above this limit reset after use. Set to 0 to turn connection cache off. The limit applies to the disks connections. disk_connections_warn_limit {#disk_connections_warn_limit} Warning massages are written to the logs if number of in-use connections are higher than this limit. The limit applies to the disks connections. display_secrets_in_show_and_select {#display_secrets_in_show_and_select} Enables or disables showing secrets in SHOW and SELECT queries for tables, databases, table functions, and dictionaries. User wishing to see secrets must also have format_display_secrets_in_show_and_select format setting turned on and a displaySecretsInShowAndSelect privilege. Possible values: 0 — Disabled. 1 — Enabled. distributed_cache_apply_throttling_settings_from_client {#distributed_cache_apply_throttling_settings_from_client} Whether cache server should apply throttling settings received from client. distributed_cache_keep_up_free_connections_ratio {#distributed_cache_keep_up_free_connections_ratio} Soft limit for number of active connection distributed cache will try to keep free. After the number of free connections goes below distributed_cache_keep_up_free_connections_ratio * max_connections, connections with oldest activity will be closed until the number goes above the limit. distributed_ddl {#distributed_ddl} Manage executing distributed ddl queries ( CREATE , DROP , ALTER , RENAME ) on cluster. Works only if ZooKeeper is enabled. The configurable settings within <distributed_ddl> include:
{"source_file": "settings.md"}
[ -0.014177427627146244, 0.03215475380420685, -0.09282360225915909, 0.02625281549990177, -0.041514161974191666, -0.015644438564777374, 0.0061257691122591496, -0.001025223871693015, -0.01439214963465929, 0.03600088506937027, 0.029803505167365074, 0.06492950767278671, 0.05590057745575905, -0.0...
fb789970-2ea4-4335-a74e-23d8ab0eca6e
Manage executing distributed ddl queries ( CREATE , DROP , ALTER , RENAME ) on cluster. Works only if ZooKeeper is enabled. The configurable settings within <distributed_ddl> include: | Setting | Description | Default Value | |------------------------|-----------------------------------------------------------------------------------------------------------------------------------|----------------------------------------| | path | the path in Keeper for the task_queue for DDL queries | | | profile | the profile used to execute the DDL queries | | | pool_size | how many ON CLUSTER queries can be run simultaneously | | | max_tasks_in_queue | the maximum number of tasks that can be in the queue. | 1,000 | | task_max_lifetime | delete node if its age is greater than this value. | 7 * 24 * 60 * 60 (a week in seconds) | | cleanup_delay_period | cleaning starts after new node event is received if the last cleaning wasn't made sooner than cleanup_delay_period seconds ago. | 60 seconds | Example ```xml /clickhouse/task_queue/ddl <!-- Settings from this profile will be used to execute DDL queries --> <profile>default</profile> <!-- Controls how much ON CLUSTER queries can be run simultaneously. --> <pool_size>1</pool_size> <!-- Cleanup settings (active tasks will not be removed) --> <!-- Controls task TTL (default 1 week) --> <task_max_lifetime>604800</task_max_lifetime> <!-- Controls how often cleanup should be performed (in seconds) --> <cleanup_delay_period>60</cleanup_delay_period> <!-- Controls how many tasks could be in the queue --> <max_tasks_in_queue>1000</max_tasks_in_queue> ``` distributed_ddl_use_initial_user_and_roles {#distributed_ddl_use_initial_user_and_roles} If enabled, ON CLUSTER queries will preserve and use the initiator's user and roles for execution on remote shards. This ensures consistent access control across the cluster but requires that the user and roles exist on all nodes. dns_allow_resolve_names_to_ipv4 {#dns_allow_resolve_names_to_ipv4} Allows resolve names to ipv4 addresses. dns_allow_resolve_names_to_ipv6 {#dns_allow_resolve_names_to_ipv6} Allows resolve names to ipv6 addresses.
{"source_file": "settings.md"}
[ -0.0008970063063316047, -0.06336402893066406, 0.030519332736730576, 0.036665838211774826, -0.06663715839385986, -0.08304577320814133, -0.04167931526899338, -0.04778772592544556, 0.010191444307565689, 0.021419880911707878, 0.009746542200446129, -0.11169444769620895, 0.017874810844659805, -0...
cd770c26-7296-48e8-a817-d093387a756b
Allows resolve names to ipv4 addresses. dns_allow_resolve_names_to_ipv6 {#dns_allow_resolve_names_to_ipv6} Allows resolve names to ipv6 addresses. dns_cache_max_entries {#dns_cache_max_entries} Internal DNS cache max entries. dns_cache_update_period {#dns_cache_update_period} Internal DNS cache update period in seconds. dns_max_consecutive_failures {#dns_max_consecutive_failures} Max DNS resolve failures of a hostname before dropping the hostname from ClickHouse DNS cache. drop_distributed_cache_pool_size {#drop_distributed_cache_pool_size} The size of the threadpool used for dropping distributed cache. drop_distributed_cache_queue_size {#drop_distributed_cache_queue_size} The queue size of the threadpool used for dropping distributed cache. enable_azure_sdk_logging {#enable_azure_sdk_logging} Enables logging from Azure sdk encryption {#encryption} Configures a command to obtain a key to be used by encryption codecs . Key (or keys) should be written in environment variables or set in the configuration file. Keys can be hex or string with a length equal to 16 bytes. Example Loading from config: xml <encryption_codecs> <aes_128_gcm_siv> <key>1234567812345678</key> </aes_128_gcm_siv> </encryption_codecs> :::note Storing keys in the configuration file is not recommended. It isn't secure. You can move the keys into a separate config file on a secure disk and put a symlink to that config file to config.d/ folder. ::: Loading from config, when the key is in hex: xml <encryption_codecs> <aes_128_gcm_siv> <key_hex>00112233445566778899aabbccddeeff</key_hex> </aes_128_gcm_siv> </encryption_codecs> Loading key from the environment variable: xml <encryption_codecs> <aes_128_gcm_siv> <key_hex from_env="ENVVAR"></key_hex> </aes_128_gcm_siv> </encryption_codecs> Here current_key_id sets the current key for encryption, and all specified keys can be used for decryption. Each of these methods can be applied for multiple keys: xml <encryption_codecs> <aes_128_gcm_siv> <key_hex id="0">00112233445566778899aabbccddeeff</key_hex> <key_hex id="1" from_env="ENVVAR"></key_hex> <current_key_id>1</current_key_id> </aes_128_gcm_siv> </encryption_codecs> Here current_key_id shows current key for encryption. Also, users can add nonce that must be 12 bytes long (by default encryption and decryption processes use nonce that consists of zero bytes): xml <encryption_codecs> <aes_128_gcm_siv> <nonce>012345678910</nonce> </aes_128_gcm_siv> </encryption_codecs> Or it can be set in hex: xml <encryption_codecs> <aes_128_gcm_siv> <nonce_hex>abcdefabcdef</nonce_hex> </aes_128_gcm_siv> </encryption_codecs> :::note Everything mentioned above can be applied for aes_256_gcm_siv (but the key must be 32 bytes long). ::: error_log {#error_log} It is disabled by default. Enabling
{"source_file": "settings.md"}
[ -0.02944863773882389, 0.0079949414357543, 0.0027318953070789576, -0.010258620604872704, -0.06883499771356583, -0.039632782340049744, -0.012055374681949615, -0.09707120805978775, 0.02916567027568817, 0.0831751823425293, -0.006240307819098234, 0.03728443384170532, -0.0047041322104632854, -0....
5e52568b-c597-4787-a615-880113137c7c
:::note Everything mentioned above can be applied for aes_256_gcm_siv (but the key must be 32 bytes long). ::: error_log {#error_log} It is disabled by default. Enabling To manually turn on error history collection system.error_log , create /etc/clickhouse-server/config.d/error_log.xml with the following content: xml <clickhouse> <error_log> <database>system</database> <table>error_log</table> <flush_interval_milliseconds>7500</flush_interval_milliseconds> <collect_interval_milliseconds>1000</collect_interval_milliseconds> <max_size_rows>1048576</max_size_rows> <reserved_size_rows>8192</reserved_size_rows> <buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold> <flush_on_crash>false</flush_on_crash> </error_log> </clickhouse> Disabling To disable error_log setting, you should create the following file /etc/clickhouse-server/config.d/disable_error_log.xml with the following content: xml <clickhouse> <error_log remove="1" /> </clickhouse> format_parsing_thread_pool_queue_size {#format_parsing_thread_pool_queue_size} The maximum number of jobs that can be scheduled on thread pool for parsing input. :::note A value of 0 means unlimited. ::: format_schema_path {#format_schema_path} The path to the directory with the schemes for the input data, such as schemas for the CapnProto format. Example ```xml format_schemas/ ``` global_profiler_cpu_time_period_ns {#global_profiler_cpu_time_period_ns} Period for CPU clock timer of global profiler (in nanoseconds). Set 0 value to turn off the CPU clock global profiler. Recommended value is at least 10000000 (100 times a second) for single queries or 1000000000 (once a second) for cluster-wide profiling. global_profiler_real_time_period_ns {#global_profiler_real_time_period_ns} Period for real clock timer of global profiler (in nanoseconds). Set 0 value to turn off the real clock global profiler. Recommended value is at least 10000000 (100 times a second) for single queries or 1000000000 (once a second) for cluster-wide profiling. google_protos_path {#google_protos_path} Defines a directory containing proto files for Protobuf types. Example: xml <google_protos_path>/usr/share/clickhouse/protos/</google_protos_path> graphite {#graphite} Sending data to Graphite . Settings: host – The Graphite server. port – The port on the Graphite server. interval – The interval for sending, in seconds. timeout – The timeout for sending data, in seconds. root_path – Prefix for keys. metrics – Sending data from the system.metrics table. events – Sending deltas data accumulated for the time period from the system.events table. events_cumulative – Sending cumulative data from the system.events table. asynchronous_metrics – Sending data from the system.asynchronous_metrics table.
{"source_file": "settings.md"}
[ 0.0029608041513711214, 0.010522570461034775, -0.023263365030288696, -0.0023775543086230755, -0.003716601524502039, -0.07947280257940292, 0.010606972500681877, -0.006771635729819536, -0.046075526624917984, 0.017414452508091927, 0.0374443419277668, -0.03171169012784958, 0.021295009180903435, ...
73222306-333b-4dfa-831b-69fbef47c391
events_cumulative – Sending cumulative data from the system.events table. asynchronous_metrics – Sending data from the system.asynchronous_metrics table. You can configure multiple <graphite> clauses. For instance, you can use this for sending different data at different intervals. Example xml <graphite> <host>localhost</host> <port>42000</port> <timeout>0.1</timeout> <interval>60</interval> <root_path>one_min</root_path> <metrics>true</metrics> <events>true</events> <events_cumulative>false</events_cumulative> <asynchronous_metrics>true</asynchronous_metrics> </graphite> graphite_rollup {#graphite_rollup} Settings for thinning data for Graphite. For more details, see GraphiteMergeTree . Example xml <graphite_rollup_example> <default> <function>max</function> <retention> <age>0</age> <precision>60</precision> </retention> <retention> <age>3600</age> <precision>300</precision> </retention> <retention> <age>86400</age> <precision>3600</precision> </retention> </default> </graphite_rollup_example> hsts_max_age {#hsts_max_age} Expired time for HSTS in seconds. :::note A value of 0 means ClickHouse disables HSTS. If you set a positive number, the HSTS will be enabled and the max-age is the number you set. ::: Example xml <hsts_max_age>600000</hsts_max_age> http_connections_soft_limit {#http_connections_soft_limit} Connections above this limit have significantly shorter time to live. The limit applies to the http connections which do not belong to any disk or storage. http_connections_store_limit {#http_connections_store_limit} Connections above this limit reset after use. Set to 0 to turn connection cache off. The limit applies to the http connections which do not belong to any disk or storage. http_connections_warn_limit {#http_connections_warn_limit} Warning massages are written to the logs if number of in-use connections are higher than this limit. The limit applies to the http connections which do not belong to any disk or storage. http_handlers {#http_handlers} Allows using custom HTTP handlers. To add a new http handler simply add a new <rule> . Rules are checked from top to bottom as defined, and the first match will run the handler. The following settings can be configured by sub-tags:
{"source_file": "settings.md"}
[ -0.04190732166171074, 0.02594754472374916, -0.03721349686384201, 0.021805787459015846, -0.07050944864749908, -0.08737140893936157, -0.02158387191593647, 0.03866522014141083, -0.051258981227874756, 0.04758547991514206, 0.058354903012514114, -0.09258756786584854, 0.046322211623191833, -0.057...
0559d86a-7e6f-4e3d-85bb-3201e9b7ddf1
The following settings can be configured by sub-tags: | Sub-tags | Definition | |----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| | url | To match the request URL, you can use the 'regex:' prefix to use regex match (optional) | | methods | To match request methods, you can use commas to separate multiple method matches (optional) | | headers | To match request headers, match each child element (child element name is header name), you can use 'regex:' prefix to use regex match (optional) | | handler | The request handler | | empty_query_string | Check that there is no query string in the URL | handler contains the following settings, which can be configured by sub-tags:
{"source_file": "settings.md"}
[ -0.1066412702202797, 0.046345505863428116, -0.026647817343473434, -0.05200379714369774, -0.02752080373466015, -0.0573878213763237, -0.032075267285108566, 0.036889493465423584, -0.033812135457992554, -0.00741230184212327, -0.03218439593911171, -0.08753553032875061, 0.0373251847922802, 0.018...
2a615f81-52db-411c-8b23-03ec4121f31d
handler contains the following settings, which can be configured by sub-tags: | Sub-tags | Definition | |--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| | url | A location for redirect | | type | Supported types: static, dynamic_query_handler, predefined_query_handler, redirect | | status | Use with static type, response status code | | query_param_name | Use with dynamic_query_handler type, extracts and executes the value corresponding to the <query_param_name> value in HTTP request params | | query | Use with predefined_query_handler type, executes query when the handler is called | | content_type | Use with static type, response content-type | | response_content | Use with static type, Response content sent to client, when using the prefix 'file://' or 'config://', find the content from the file or configuration send to client | Along with a list of rules, you can specify <defaults/> which specifies to enable all the default handlers. Example: ```xml / POST,GET no-cache dynamic_query_handler query <rule> <url>/predefined_query</url> <methods>POST,GET</methods> <handler> <type>predefined_query_handler</type> <query>SELECT * FROM system.settings</query> </handler> </rule> <rule> <handler> <type>static</type> <status>200</status> <content_type>text/plain; charset=UTF-8</content_type> <response_content>config://http_server_default_response</response_content> </handler> </rule> ``` http_options_response {#http_options_response} Used to add headers to the response in an OPTIONS HTTP request. The OPTIONS method is used when making CORS preflight requests. For more information, see OPTIONS . Example:
{"source_file": "settings.md"}
[ 0.0022468692623078823, -0.024299256503582, -0.06750370562076569, 0.04488313943147659, -0.05500118434429169, -0.03776117041707039, 0.03238164633512497, 0.03641591966152191, -0.0782516673207283, -0.006142797414213419, 0.0044457027688622475, -0.04669822007417679, 0.025383276864886284, -0.0218...
a161cb51-e1f9-4959-9173-503b5bcf9955
Used to add headers to the response in an OPTIONS HTTP request. The OPTIONS method is used when making CORS preflight requests. For more information, see OPTIONS . Example: xml <http_options_response> <header> <name>Access-Control-Allow-Origin</name> <value>*</value> </header> <header> <name>Access-Control-Allow-Headers</name> <value>origin, x-requested-with, x-clickhouse-format, x-clickhouse-user, x-clickhouse-key, Authorization</value> </header> <header> <name>Access-Control-Allow-Methods</name> <value>POST, GET, OPTIONS</value> </header> <header> <name>Access-Control-Max-Age</name> <value>86400</value> </header> </http_options_response> http_server_default_response {#http_server_default_response} The page that is shown by default when you access the ClickHouse HTTP(s) server. The default value is "Ok." (with a line feed at the end) Example Opens https://tabix.io/ when accessing http://localhost: http_port . ```xml <html ng-app="SMI2"><head><base href="http://ui.tabix.io/"></head><body><div ui-view="" class="content-ui"></div><script src="http://loader.tabix.io/master.js"></script></body></html> ``` iceberg_catalog_threadpool_pool_size {#iceberg_catalog_threadpool_pool_size} Size of background pool for iceberg catalog iceberg_catalog_threadpool_queue_size {#iceberg_catalog_threadpool_queue_size} Number of tasks which is possible to push into iceberg catalog pool iceberg_metadata_files_cache_max_entries {#iceberg_metadata_files_cache_max_entries} Maximum size of iceberg metadata files cache in entries. Zero means disabled. iceberg_metadata_files_cache_policy {#iceberg_metadata_files_cache_policy} Iceberg metadata cache policy name. iceberg_metadata_files_cache_size {#iceberg_metadata_files_cache_size} Maximum size of iceberg metadata cache in bytes. Zero means disabled. iceberg_metadata_files_cache_size_ratio {#iceberg_metadata_files_cache_size_ratio} The size of the protected queue (in case of SLRU policy) in the iceberg metadata cache relative to the cache's total size. ignore_empty_sql_security_in_create_view_query {#ignore_empty_sql_security_in_create_view_query} If true, ClickHouse doesn't write defaults for empty SQL security statement in CREATE VIEW queries. :::note This setting is only necessary for the migration period and will become obsolete in 24.4 ::: include_from {#include_from} The path to the file with substitutions. Both XML and YAML formats are supported. For more information, see the section " Configuration files ". Example xml <include_from>/etc/metrica.xml</include_from> index_mark_cache_policy {#index_mark_cache_policy} Secondary index mark cache policy name. index_mark_cache_size {#index_mark_cache_size} Maximum size of cache for index marks. :::note A value of 0 means disabled.
{"source_file": "settings.md"}
[ -0.034139517694711685, 0.09344083070755005, -0.07976173609495163, -0.06337365508079529, -0.054298751056194305, -0.031198516488075256, -0.0674973726272583, -0.01687723584473133, -0.010567070916295052, 0.02215147390961647, 0.05199167877435684, -0.0029994931537657976, -0.055526457726955414, 0...
472a094b-3a51-4e9e-bc2b-f75aefae20d5
Secondary index mark cache policy name. index_mark_cache_size {#index_mark_cache_size} Maximum size of cache for index marks. :::note A value of 0 means disabled. This setting can be modified at runtime and will take effect immediately. ::: index_mark_cache_size_ratio {#index_mark_cache_size_ratio} The size of the protected queue (in case of SLRU policy) in the secondary index mark cache relative to the cache's total size. index_uncompressed_cache_policy {#index_uncompressed_cache_policy} Secondary index uncompressed cache policy name. index_uncompressed_cache_size {#index_uncompressed_cache_size} Maximum size of cache for uncompressed blocks of MergeTree indices. :::note A value of 0 means disabled. This setting can be modified at runtime and will take effect immediately. ::: index_uncompressed_cache_size_ratio {#index_uncompressed_cache_size_ratio} The size of the protected queue (in case of SLRU policy) in the secondary index uncompressed cache relative to the cache's total size. interserver_http_credentials {#interserver_http_credentials} A username and a password used to connect to other servers during replication . Additionally, the server authenticates other replicas using these credentials. interserver_http_credentials must therefore be the same for all replicas in a cluster. :::note - By default, if interserver_http_credentials section is omitted, authentication is not used during replication. - interserver_http_credentials settings do not relate to a ClickHouse client credentials configuration . - These credentials are common for replication via HTTP and HTTPS . ::: The following settings can be configured by sub-tags: user — Username. password — Password. allow_empty — If true , then other replicas are allowed to connect without authentication even if credentials are set. If false , then connections without authentication are refused. Default: false . old — Contains old user and password used during credential rotation. Several old sections can be specified. Credentials Rotation ClickHouse supports dynamic interserver credentials rotation without stopping all replicas at the same time to update their configuration. Credentials can be changed in several steps. To enable authentication, set interserver_http_credentials.allow_empty to true and add credentials. This allows connections with authentication and without it. xml <interserver_http_credentials> <user>admin</user> <password>111</password> <allow_empty>true</allow_empty> </interserver_http_credentials> After configuring all replicas set allow_empty to false or remove this setting. It makes authentication with new credentials mandatory.
{"source_file": "settings.md"}
[ 0.008047117851674557, 0.024846786633133888, -0.00953642837703228, 0.039623089134693146, -0.019537338986992836, -0.03320341557264328, -0.014228953048586845, 0.02675173059105873, -0.03449004888534546, -0.017333807423710823, 0.05506177991628647, 0.0523177832365036, -0.03776254504919052, -0.03...
4e4c5803-3abd-4aba-896b-50c85c2970f7
After configuring all replicas set allow_empty to false or remove this setting. It makes authentication with new credentials mandatory. To change existing credentials, move the username and the password to interserver_http_credentials.old section and update user and password with new values. At this point the server uses new credentials to connect to other replicas and accepts connections with either new or old credentials. xml <interserver_http_credentials> <user>admin</user> <password>222</password> <old> <user>admin</user> <password>111</password> </old> <old> <user>temp</user> <password>000</password> </old> </interserver_http_credentials> When new credentials are applied to all replicas, old credentials may be removed. interserver_http_host {#interserver_http_host} The hostname that can be used by other servers to access this server. If omitted, it is defined in the same way as the hostname -f command. Useful for breaking away from a specific network interface. Example xml <interserver_http_host>example.clickhouse.com</interserver_http_host> interserver_http_port {#interserver_http_port} Port for exchanging data between ClickHouse servers. Example xml <interserver_http_port>9009</interserver_http_port> interserver_https_host {#interserver_https_host} Similar to interserver_http_host , except that this hostname can be used by other servers to access this server over HTTPS . Example xml <interserver_https_host>example.clickhouse.com</interserver_https_host> interserver_https_port {#interserver_https_port} Port for exchanging data between ClickHouse servers over HTTPS . Example xml <interserver_https_port>9010</interserver_https_port> interserver_listen_host {#interserver_listen_host} Restriction on hosts that can exchange data between ClickHouse servers. If Keeper is used, the same restriction will be applied to the communication between different Keeper instances. :::note By default, the value is equal to the listen_host setting. ::: Example xml <interserver_listen_host>::ffff:a00:1</interserver_listen_host> <interserver_listen_host>10.0.0.1</interserver_listen_host> Type: Default: io_thread_pool_queue_size {#io_thread_pool_queue_size} The maximum number of jobs that can be scheduled on the IO Thread pool. :::note A value of 0 means unlimited. ::: jemalloc_collect_global_profile_samples_in_trace_log {#jemalloc_collect_global_profile_samples_in_trace_log} Store jemalloc's sampled allocations in system.trace_log jemalloc_enable_background_threads {#jemalloc_enable_background_threads} Enable jemalloc background threads. Jemalloc uses background threads to cleanup unused memory pages. Disabling it could lead to performance degradation. jemalloc_enable_global_profiler {#jemalloc_enable_global_profiler}
{"source_file": "settings.md"}
[ -0.10527002066373825, 0.013475670479238033, -0.018636954948306084, -0.071963831782341, -0.06381358951330185, -0.06316184252500534, -0.054601240903139114, -0.029163211584091187, -0.009897184558212757, 0.031798768788576126, 0.038139160722494125, -0.00045761774526908994, 0.09824152290821075, ...
0b11d1bd-a472-4af1-a4b9-05598a5ef183
jemalloc_enable_global_profiler {#jemalloc_enable_global_profiler} Enable jemalloc's allocation profiler for all threads. Jemalloc will sample allocations and all deallocations for sampled allocations. Profiles can be flushed using SYSTEM JEMALLOC FLUSH PROFILE which can be used for allocation analysis. Samples can also be stored in system.trace_log using config jemalloc_collect_global_profile_samples_in_trace_log or with query setting jemalloc_collect_profile_samples_in_trace_log. See Allocation Profiling jemalloc_flush_profile_interval_bytes {#jemalloc_flush_profile_interval_bytes} Flushing jemalloc profile will be done after global peak memory usage increased by jemalloc_flush_profile_interval_bytes jemalloc_flush_profile_on_memory_exceeded {#jemalloc_flush_profile_on_memory_exceeded} Flushing jemalloc profile will be done on total memory exceeded errors jemalloc_max_background_threads_num {#jemalloc_max_background_threads_num} Maximum amount of jemalloc background threads to create, set to 0 to use jemalloc's default value keep_alive_timeout {#keep_alive_timeout} The number of seconds that ClickHouse waits for incoming requests for HTTP protocol before closing the connection. Example xml <keep_alive_timeout>10</keep_alive_timeout> keeper_hosts {#keeper_hosts} Dynamic setting. Contains a set of [Zoo]Keeper hosts ClickHouse can potentially connect to. Doesn't expose information from <auxiliary_zookeepers> keeper_multiread_batch_size {#keeper_multiread_batch_size} Maximum size of batch for MultiRead request to [Zoo]Keeper that support batching. If set to 0, batching is disabled. Available only in ClickHouse Cloud. ldap_servers {#ldap_servers} List LDAP servers with their connection parameters here to: - use them as authenticators for dedicated local users, who have an 'ldap' authentication mechanism specified instead of 'password' - use them as remote user directories. The following settings can be configured by sub-tags:
{"source_file": "settings.md"}
[ 0.06679117679595947, -0.029903899878263474, -0.10925988852977753, -0.00774490786716342, -0.04919129237532616, -0.04258650168776512, 0.03666356950998306, 0.03628195822238922, -0.10457775741815567, 0.028186514973640442, -0.032735154032707214, 0.001511230948381126, 0.010902668349444866, -0.04...
2db969f7-b057-466d-b53c-21ff08425406
| Setting | Description | |--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | host | LDAP server hostname or IP, this parameter is mandatory and cannot be empty. | | port | LDAP server port, default is 636 if enable_tls is set to true, 389 otherwise. | | bind_dn | Template used to construct the DN to bind to. The resulting DN will be constructed by replacing all \{user_name\} substrings of the template with the actual user name during each authentication attempt. | | user_dn_detection | Section with LDAP search parameters for detecting the actual user DN of the bound user. This is mainly used in search filters for further role mapping when the server is Active Directory. The resulting user DN will be used when replacing \{user_dn\} substrings wherever they are allowed. By default, user DN is set equal to bind DN, but once search is performed, it will be updated with to the actual detected user DN value. | | verification_cooldown
{"source_file": "settings.md"}
[ 0.006768797058612108, 0.05490603297948837, -0.008100280538201332, -0.013823586516082287, -0.060014259070158005, 0.06565206497907639, 0.015915783122181892, 0.04085556045174599, 0.024794938042759895, -0.07015565782785416, 0.02678033895790577, -0.03776750713586807, -0.015760915353894234, -0.0...
7fe9e55c-2e0f-4cef-bf80-4ab18a1ed90e
| verification_cooldown | A period of time, in seconds, after a successful bind attempt, during which a user will be assumed to be successfully authenticated for all consecutive requests without contacting the LDAP server. Specify 0 (the default) to disable caching and force contacting the LDAP server for each authentication request. | | enable_tls | Flag to trigger use of secure connection to the LDAP server. Specify no for plain text ( ldap:// ) protocol (not recommended). Specify yes for LDAP over SSL/TLS ( ldaps:// ) protocol (recommended, the default). Specify starttls for legacy StartTLS protocol (plain text ( ldap:// ) protocol, upgraded to TLS). | | tls_minimum_protocol_version | The minimum protocol version of SSL/TLS. Accepted values are: ssl2 , ssl3 , tls1.0 , tls1.1 , tls1.2 (the default). | | tls_require_cert | SSL/TLS peer certificate verification behavior. Accepted values are: never , allow , try , demand (the default). | | tls_cert_file | path to certificate file. | | tls_key_file | path to certificate key file. | | tls_ca_cert_file
{"source_file": "settings.md"}
[ -0.056930407881736755, 0.03600209206342697, -0.037120599299669266, -0.014328725636005402, -0.03706946223974228, -0.06679379940032959, 0.002449631690979004, -0.04874272644519806, -0.03302060440182686, -0.04811694473028183, 0.07750300318002701, 0.002876026090234518, 0.04232921823859215, 0.02...
1d3a322b-b067-426c-b2f4-3f4b2fb28a83
| tls_ca_cert_file | path to CA certificate file. | | tls_ca_cert_dir | path to the directory containing CA certificates. | | tls_cipher_suite | allowed cipher suite (in OpenSSL notation). |
{"source_file": "settings.md"}
[ 0.036482539027929306, 0.06845264881849289, -0.04742556810379028, -0.009263129904866219, 0.009534490294754505, -0.025462977588176727, -0.04921082779765129, -0.0317651629447937, 0.021856551989912987, -0.07469000667333603, 0.06309441477060318, -0.031997960060834885, 0.04761771857738495, 0.018...
09bee1bf-b8ba-4b38-81bd-773f51e39a16
Setting user_dn_detection can be configured with sub-tags: | Setting | Description | |-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | base_dn | template used to construct the base DN for the LDAP search. The resulting DN will be constructed by replacing all \{user_name\} and '{bind_dn}' substrings of the template with the actual user name and bind DN during the LDAP search. | | scope | scope of the LDAP search. Accepted values are: base , one_level , children , subtree (the default). | | search_filter | template used to construct the search filter for the LDAP search. The resulting filter will be constructed by replacing all \{user_name\} , \{bind_dn\} , and \{base_dn\} substrings of the template with the actual user name, bind DN, and base DN during the LDAP search. Note, that the special characters must be escaped properly in XML. | Example: xml <my_ldap_server> <host>localhost</host> <port>636</port> <bind_dn>uid={user_name},ou=users,dc=example,dc=com</bind_dn> <verification_cooldown>300</verification_cooldown> <enable_tls>yes</enable_tls> <tls_minimum_protocol_version>tls1.2</tls_minimum_protocol_version> <tls_require_cert>demand</tls_require_cert> <tls_cert_file>/path/to/tls_cert_file</tls_cert_file> <tls_key_file>/path/to/tls_key_file</tls_key_file> <tls_ca_cert_file>/path/to/tls_ca_cert_file</tls_ca_cert_file> <tls_ca_cert_dir>/path/to/tls_ca_cert_dir</tls_ca_cert_dir> <tls_cipher_suite>ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:AES256-GCM-SHA384</tls_cipher_suite> </my_ldap_server> Example (typical Active Directory with configured user DN detection for further role mapping):
{"source_file": "settings.md"}
[ -0.015746617689728737, -0.01836397312581539, -0.01579834334552288, -0.05910888686776161, -0.06711805611848831, -0.04216407611966133, 0.0808972641825676, 0.026125963777303696, -0.016306836158037186, -0.10031449049711227, 0.018442774191498756, -0.04850952699780464, 0.012914090417325497, 0.01...
5a5bfa95-f789-44a5-8c45-bc36ea80f7fc
Example (typical Active Directory with configured user DN detection for further role mapping): xml <my_ad_server> <host>localhost</host> <port>389</port> <bind_dn>EXAMPLE\{user_name}</bind_dn> <user_dn_detection> <base_dn>CN=Users,DC=example,DC=com</base_dn> <search_filter>(&amp;(objectClass=user)(sAMAccountName={user_name}))</search_filter> </user_dn_detection> <enable_tls>no</enable_tls> </my_ad_server> license_key {#license_key} License key for ClickHouse Enterprise Edition listen_backlog {#listen_backlog} Backlog (queue size of pending connections) of the listen socket. The default value of 4096 is the same as that of linux 5.4+ ). Usually this value does not need to be changed, since: - The default value is large enough, - For accepting client's connections server has separate thread. So even if you have TcpExtListenOverflows (from nstat ) non-zero and this counter grows for ClickHouse server it does not mean that this value needs to be increased, since: - Usually if 4096 is not enough it shows some internal ClickHouse scaling issue, so it is better to report an issue. - It does not mean that the server can handle more connections later (and even if it could, by that moment clients may be gone or disconnected). Example xml <listen_backlog>4096</listen_backlog> listen_host {#listen_host} Restriction on hosts that requests can come from. If you want the server to answer all of them, specify :: . Examples: xml <listen_host>::1</listen_host> <listen_host>127.0.0.1</listen_host> listen_reuse_port {#listen_reuse_port} Allow multiple servers to listen on the same address:port. Requests will be routed to a random server by the operating system. Enabling this setting is not recommended. Example xml <listen_reuse_port>0</listen_reuse_port> Type: Default: listen_try {#listen_try} The server will not exit if IPv6 or IPv4 networks are unavailable while trying to listen. Example xml <listen_try>0</listen_try> load_marks_threadpool_pool_size {#load_marks_threadpool_pool_size} Size of background pool for marks loading load_marks_threadpool_queue_size {#load_marks_threadpool_queue_size} Number of tasks which is possible to push into prefetches pool logger {#logger} The location and format of log messages. Keys :
{"source_file": "settings.md"}
[ -0.025664284825325012, -0.03636441007256508, -0.09725052118301392, -0.06883479654788971, -0.10866834968328476, -0.04502105340361595, 0.08043470233678818, -0.047711990773677826, -0.02068927139043808, -0.038384079933166504, 0.040564682334661484, 0.013006379827857018, 0.024462249130010605, -0...
4fe6a697-1977-4efa-b032-8c47ae7c19e3
| Key | Description | |------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------| | level | Log level. Acceptable values: none (turn logging off), fatal , critical , error , warning , notice , information , debug , trace , test | | log | The path to the log file. | | errorlog | The path to the error log file. | | size | Rotation policy: Maximum size of the log files in bytes. Once the log file size exceeds this threshold, it is renamed and archived, and a new log file is created. | | count | Rotation policy: How many historical log files Clickhouse are kept at most. | | stream_compress | Compress log messages using LZ4. Set to 1 or true to enable. | | console | Enable logging to the console. Set to 1 or true to enable. Default is 1 if Clickhouse does not run in daemon mode, 0 otherwise. | | console_log_level | Log level for console output. Defaults to level . | | formatting.type | Log format for console output. Currently, only json is supported | | use_syslog | Also forward log output to syslog. | | syslog_level | Log level for logging to syslog. | | async | When true (default) logging will happen asynchronously (one background thread per output channel). Otherwise it will log inside the thread calling LOG | | async_queue_max_size | When using async logging, the max amount of messages that will be kept in the the queue waiting for flushing. Extra messages will be dropped | | startup_level
{"source_file": "settings.md"}
[ 0.0015555497957393527, 0.04938477277755737, -0.06781656295061111, -0.019862260669469833, 0.020236698910593987, -0.035145003348588943, 0.03612441197037697, 0.07813821732997894, -0.018627557903528214, 0.04001590609550476, 0.09120729565620422, -0.05377712845802307, 0.06703827530145645, -0.040...
f745b38d-00e1-46d6-9c84-b1f5b0f8ac28
| When using async logging, the max amount of messages that will be kept in the the queue waiting for flushing. Extra messages will be dropped | | startup_level | Startup level is used to set the root logger level at server startup. After startup log level is reverted to the level setting | | shutdown_level | Shutdown level is used to set the root logger level at server Shutdown. |
{"source_file": "settings.md"}
[ -0.019577374681830406, -0.015841513872146606, -0.04675060883164406, 0.07347841560840607, 0.031023995950818062, -0.0652993693947792, -0.004324700217694044, -0.02045922912657261, 0.02704562060534954, 0.0002045373694272712, 0.04197787120938301, 0.07077960669994354, -0.00798866804689169, -0.02...
4e159910-a9e4-4ce8-8624-2f4002620dc9
Log format specifiers File names in log and errorLog paths support below format specifiers for the resulting file name (the directory part does not support them). Column "Example" shows the output at 2023-07-06 18:32:07 .
{"source_file": "settings.md"}
[ 0.059388745576143265, -0.006539021153002977, -0.04718291386961937, -0.008526543155312538, 0.07356168329715729, -0.018915168941020966, -0.03936704248189926, 0.07421882450580597, 0.04351675137877464, 0.032253313809633255, 0.03219881281256676, -0.02376304753124714, 0.003627805970609188, 0.066...
6297896c-427e-40b6-9c79-c9c1ceaf65d6
| Specifier | Description | Example | |--------------|---------------------------------------------------------------------------------------------------------------------|--------------------------| | %% | Literal % | % | | %n | New-line character | | | %t | Horizontal tab character | | | %Y | Year as a decimal number, e.g. 2017 | 2023 | | %y | Last 2 digits of year as a decimal number (range [00,99]) | 23 | | %C | First 2 digits of year as a decimal number (range [00,99]) | 20 | | %G | Four-digit ISO 8601 week-based year , i.e. the year that contains the specified week. Normally useful only with %V | 2023 | | %g | Last 2 digits of ISO 8601 week-based year , i.e. the year that contains the specified week. | 23 | | %b | Abbreviated month name, e.g. Oct (locale dependent) | Jul | | %h | Synonym of %b | Jul | | %B | Full month name, e.g. October (locale dependent) | July | | %m | Month as a decimal number (range [01,12]) | 07 | | %U | Week of the year as a decimal number (Sunday is the first day of the week) (range [00,53]) | 27 | | %W | Week of the year as a decimal number (Monday is the first day of the week) (range [00,53]) | 27 | | %V | ISO 8601 week number (range [01,53]) | 27 | | %j | Day of the year as a decimal number (range [001,366]) | 187 | | %d
{"source_file": "settings.md"}
[ 0.041220348328351974, 0.06312332302331924, -0.06822928041219711, -0.015116143971681595, -0.08008792251348495, 0.08249332010746002, -0.030615370720624924, 0.07101243734359741, -0.05321400985121727, -0.009620768018066883, 0.04528052359819412, -0.13198545575141907, 0.01984265260398388, 0.0043...
d4708e9c-fde1-460e-9b29-a57a732b3b78
27 | | %j | Day of the year as a decimal number (range [001,366]) | 187 | | %d | Day of the month as a zero-padded decimal number (range [01,31]). Single digit is preceded by zero. | 06 | | %e | Day of the month as a space-padded decimal number (range [1,31]). Single digit is preceded by a space. | &nbsp; 6 | | %a | Abbreviated weekday name, e.g. Fri (locale dependent) | Thu | | %A | Full weekday name, e.g. Friday (locale dependent) | Thursday | | %w | Weekday as a integer number with Sunday as 0 (range [0-6]) | 4 | | %u | Weekday as a decimal number, where Monday is 1 (ISO 8601 format) (range [1-7]) | 4 | | %H | Hour as a decimal number, 24 hour clock (range [00-23]) | 18 | | %I | Hour as a decimal number, 12 hour clock (range [01,12]) | 06 | | %M | Minute as a decimal number (range [00,59]) | 32 | | %S | Second as a decimal number (range [00,60]) | 07 | | %c | Standard date and time string, e.g. Sun Oct 17 04:41:13 2010 (locale dependent) | Thu Jul 6 18:32:07 2023 | | %x | Localized date representation (locale dependent) | 07/06/23 | | %X | Localized time representation, e.g. 18:40:20 or 6:40:20 PM (locale dependent) | 18:32:07 | | %D | Short MM/DD/YY date, equivalent to %m/%d/%y | 07/06/23 | | %F | Short YYYY-MM-DD date, equivalent to %Y-%m-%d | 2023-07-06 | | %r | Localized 12-hour clock time (locale dependent) | 06:32:07 PM | | %R | Equivalent to "%H:%M" | 18:32 | | %T
{"source_file": "settings.md"}
[ 0.03521057590842247, 0.05375775322318077, -0.006846831180155277, 0.028217311948537827, -0.07283435016870499, 0.030059996992349625, -0.025153176859021187, 0.010002273134887218, -0.09591116011142731, -0.0679725706577301, -0.0010201656259596348, -0.07807625085115433, -0.004970852751284838, 0....
583e51f0-ae65-4ff2-8d8f-bfc6371f6f42
06:32:07 PM | | %R | Equivalent to "%H:%M" | 18:32 | | %T | Equivalent to "%H:%M:%S" (the ISO 8601 time format) | 18:32:07 | | %p | Localized a.m. or p.m. designation (locale dependent) | PM | | %z | Offset from UTC in the ISO 8601 format (e.g. -0430), or no characters if the time zone information is not available | +0800 | | %Z | Locale-dependent time zone name or abbreviation, or no characters if the time zone information is not available | Z AWST |
{"source_file": "settings.md"}
[ 0.0601738765835762, 0.02009645476937294, -0.06050185486674309, 0.008450903929769993, 0.03206067532300949, 0.0564560741186142, -0.031100349500775337, 0.05777384340763092, 0.009231933392584324, -0.07053939253091812, 0.025163976475596428, -0.05565037950873375, -0.05896274372935295, -0.0189223...
231c2956-5d60-4592-8aba-c6888056327e
Example xml <logger> <level>trace</level> <log>/var/log/clickhouse-server/clickhouse-server-%F-%T.log</log> <errorlog>/var/log/clickhouse-server/clickhouse-server-%F-%T.err.log</errorlog> <size>1000M</size> <count>10</count> <stream_compress>true</stream_compress> </logger> To print log messages only in the console: xml <logger> <level>information</level> <console>true</console> </logger> Per-level Overrides The log level of individual log names can be overridden. For example, to mute all messages of loggers "Backup" and "RBAC". xml <logger> <levels> <logger> <name>Backup</name> <level>none</level> </logger> <logger> <name>RBAC</name> <level>none</level> </logger> </levels> </logger> syslog To write log messages additionally to syslog: xml <logger> <use_syslog>1</use_syslog> <syslog> <address>syslog.remote:10514</address> <hostname>myhost.local</hostname> <facility>LOG_LOCAL6</facility> <format>syslog</format> </syslog> </logger> Keys for <syslog> : | Key | Description | |------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | address | The address of syslog in format host\[:port\] . If omitted, the local daemon is used. | | hostname | The name of the host from which logs are send (optional). | | facility | The syslog facility keyword . Must be specified uppercase with a "LOG_" prefix, e.g. LOG_USER , LOG_DAEMON , LOG_LOCAL3 , etc. Default: LOG_USER if address is specified, LOG_DAEMON otherwise. | | format | Log message format. Possible values: bsd and syslog. | Log formats You can specify the log format that will be outputted in the console log. Currently, only JSON is supported. Example Here is an example of an output JSON log:
{"source_file": "settings.md"}
[ 0.014063620008528233, -0.010153839364647865, -0.0716831386089325, 0.009557642973959446, 0.05889444425702095, -0.07544643431901932, 0.06989526003599167, -0.00937009509652853, 0.005994543433189392, 0.0049712820909917355, 0.04582320526242256, -0.05137743055820465, 0.08337730914354324, -0.0411...
4e5f63a5-30ba-469a-9b4d-94baac6de5bb
Log formats You can specify the log format that will be outputted in the console log. Currently, only JSON is supported. Example Here is an example of an output JSON log: json { "date_time_utc": "2024-11-06T09:06:09Z", "date_time": "1650918987.180175", "thread_name": "#1", "thread_id": "254545", "level": "Trace", "query_id": "", "logger_name": "BaseDaemon", "message": "Received signal 2", "source_file": "../base/daemon/BaseDaemon.cpp; virtual void SignalListener::run()", "source_line": "192" } To enable JSON logging support, use the following snippet: xml <logger> <formatting> <type>json</type> <!-- Can be configured on a per-channel basis (log, errorlog, console, syslog), or globally for all channels (then just omit it). --> <!-- <channel></channel> --> <names> <date_time>date_time</date_time> <thread_name>thread_name</thread_name> <thread_id>thread_id</thread_id> <level>level</level> <query_id>query_id</query_id> <logger_name>logger_name</logger_name> <message>message</message> <source_file>source_file</source_file> <source_line>source_line</source_line> </names> </formatting> </logger> Renaming keys for JSON logs Key names can be modified by changing tag values inside the <names> tag. For example, to change DATE_TIME to MY_DATE_TIME , you can use <date_time>MY_DATE_TIME</date_time> . Omitting keys for JSON logs Log properties can be omitted by commenting out the property. For example, if you do not want your log to print query_id , you can comment out the <query_id> tag. macros {#macros} Parameter substitutions for replicated tables. Can be omitted if replicated tables are not used. For more information, see the section Creating replicated tables . Example xml <macros incl="macros" optional="true" /> mark_cache_policy {#mark_cache_policy} Mark cache policy name. mark_cache_prewarm_ratio {#mark_cache_prewarm_ratio} The ratio of total size of mark cache to fill during prewarm. mark_cache_size {#mark_cache_size} Maximum size of cache for marks (index of MergeTree family of tables). :::note This setting can be modified at runtime and will take effect immediately. ::: mark_cache_size_ratio {#mark_cache_size_ratio} The size of the protected queue (in case of SLRU policy) in the mark cache relative to the cache's total size. max_active_parts_loading_thread_pool_size {#max_active_parts_loading_thread_pool_size} The number of threads to load active set of data parts (Active ones) at startup. max_authentication_methods_per_user {#max_authentication_methods_per_user}
{"source_file": "settings.md"}
[ 0.02715158835053444, 0.006410819478332996, -0.060652513056993484, -0.0457955077290535, 0.0323977991938591, -0.016084635630249977, 0.0009651866857893765, 0.05887620151042938, 0.028144944459199905, 0.032624296844005585, -0.038106657564640045, -0.07640582323074341, -0.04793795570731163, 0.051...
376925f3-5bef-4b28-b0ad-59df22ffb3d6
The number of threads to load active set of data parts (Active ones) at startup. max_authentication_methods_per_user {#max_authentication_methods_per_user} The maximum number of authentication methods a user can be created with or altered to. Changing this setting does not affect existing users. Create/alter authentication-related queries will fail if they exceed the limit specified in this setting. Non authentication create/alter queries will succeed. :::note A value of 0 means unlimited. ::: max_backup_bandwidth_for_server {#max_backup_bandwidth_for_server} The maximum read speed in bytes per second for all backups on server. Zero means unlimited. max_backups_io_thread_pool_free_size {#max_backups_io_thread_pool_free_size} If the number of idle threads in the Backups IO Thread pool exceeds max_backup_io_thread_pool_free_size , ClickHouse will release resources occupied by idling threads and decrease the pool size. Threads can be created again if necessary. max_backups_io_thread_pool_size {#max_backups_io_thread_pool_size} ClickHouse uses threads from the Backups IO Thread pool to do S3 backup IO operations. max_backups_io_thread_pool_size limits the maximum number of threads in the pool. max_build_vector_similarity_index_thread_pool_size {#max_build_vector_similarity_index_thread_pool_size} The maximum number of threads to use for building vector indexes. :::note A value of 0 means all cores. ::: max_concurrent_insert_queries {#max_concurrent_insert_queries} Limit on total number of concurrent insert queries. :::note A value of 0 (default) means unlimited. This setting can be modified at runtime and will take effect immediately. Queries that are already running will remain unchanged. ::: max_concurrent_queries {#max_concurrent_queries} Limit on total number of concurrently executed queries. Note that limits on INSERT and SELECT queries, and on the maximum number of queries for users must also be considered. See also: - max_concurrent_insert_queries - max_concurrent_select_queries - max_concurrent_queries_for_all_users :::note A value of 0 (default) means unlimited. This setting can be modified at runtime and will take effect immediately. Queries that are already running will remain unchanged. ::: max_concurrent_select_queries {#max_concurrent_select_queries} Limit on total number of concurrently select queries. :::note A value of 0 (default) means unlimited. This setting can be modified at runtime and will take effect immediately. Queries that are already running will remain unchanged. ::: max_connections {#max_connections} Max server connections. max_database_num_to_throw {#max_database_num_to_throw} If number of databases is greater than this value, server will throw an exception. 0 means no limitation. max_database_num_to_warn {#max_database_num_to_warn}
{"source_file": "settings.md"}
[ -0.06653597950935364, -0.006256135180592537, -0.05749465897679329, -0.005632722284644842, -0.05578549951314926, -0.09880910813808441, 0.049793001264333725, -0.015514283441007137, -0.018803376704454422, -0.004923896864056587, 0.0009886035695672035, -0.01437146496027708, 0.07897390425205231, ...
f3677b36-9496-4214-9a85-cead2b00e1cc
If number of databases is greater than this value, server will throw an exception. 0 means no limitation. max_database_num_to_warn {#max_database_num_to_warn} If the number of attached databases exceeds the specified value, clickhouse server will add warning messages to system.warnings table. Example xml <max_database_num_to_warn>50</max_database_num_to_warn> max_database_replicated_create_table_thread_pool_size {#max_database_replicated_create_table_thread_pool_size} The number of threads to create tables during replica recovery in DatabaseReplicated. Zero means number of threads equal number of cores. max_dictionary_num_to_throw {#max_dictionary_num_to_throw} If the number of dictionaries is greater than this value, the server will throw an exception. Only counts tables for database engines: - Atomic - Ordinary - Replicated - Lazy :::note A value of 0 means no limitation. ::: Example xml <max_dictionary_num_to_throw>400</max_dictionary_num_to_throw> max_dictionary_num_to_warn {#max_dictionary_num_to_warn} If the number of attached dictionaries exceeds the specified value, clickhouse server will add warning messages to system.warnings table. Example xml <max_dictionary_num_to_warn>400</max_dictionary_num_to_warn> max_distributed_cache_read_bandwidth_for_server {#max_distributed_cache_read_bandwidth_for_server} The maximum total read speed from distributed cache on server in bytes per second. Zero means unlimited. max_distributed_cache_write_bandwidth_for_server {#max_distributed_cache_write_bandwidth_for_server} The maximum total write speed to distributed cache on server in bytes per second. Zero means unlimited. max_entries_for_hash_table_stats {#max_entries_for_hash_table_stats} How many entries hash table statistics collected during aggregation is allowed to have max_fetch_partition_thread_pool_size {#max_fetch_partition_thread_pool_size} The number of threads for ALTER TABLE FETCH PARTITION. max_format_parsing_thread_pool_free_size {#max_format_parsing_thread_pool_free_size} Maximum number of idle standby threads to keep in the thread pool for parsing input. max_format_parsing_thread_pool_size {#max_format_parsing_thread_pool_size} Maximum total number of threads to use for parsing input. max_io_thread_pool_free_size {#max_io_thread_pool_free_size} If the number of idle threads in the IO Thread pool exceeds max_io_thread_pool_free_size , ClickHouse will release resources occupied by idling threads and decrease the pool size. Threads can be created again if necessary. max_io_thread_pool_size {#max_io_thread_pool_size} ClickHouse uses threads from the IO Thread pool to do some IO operations (e.g. to interact with S3). max_io_thread_pool_size limits the maximum number of threads in the pool. max_keep_alive_requests {#max_keep_alive_requests} Maximal number of requests through a single keep-alive connection until it will be closed by ClickHouse server.
{"source_file": "settings.md"}
[ 0.050038810819387436, -0.05550508201122284, -0.08736924827098846, 0.01401988510042429, -0.04579627141356468, -0.07699333876371384, 0.014728816226124763, 0.003823059145361185, -0.017662065103650093, 0.03087369166314602, 0.03852633014321327, -0.04369492083787918, 0.13348226249217987, -0.0316...
044b7e5f-ea91-4662-a1ca-a67335aaf1f5
max_keep_alive_requests {#max_keep_alive_requests} Maximal number of requests through a single keep-alive connection until it will be closed by ClickHouse server. Example xml <max_keep_alive_requests>10</max_keep_alive_requests> max_local_read_bandwidth_for_server {#max_local_read_bandwidth_for_server} The maximum speed of local reads in bytes per second. :::note A value of 0 means unlimited. ::: max_local_write_bandwidth_for_server {#max_local_write_bandwidth_for_server} The maximum speed of local writes in bytes per seconds. :::note A value of 0 means unlimited. ::: max_materialized_views_count_for_table {#max_materialized_views_count_for_table} A limit on the number of materialized views attached to a table. :::note Only directly dependent views are considered here, and the creation of one view on top of another view is not considered. ::: max_merges_bandwidth_for_server {#max_merges_bandwidth_for_server} The maximum read speed of all merges on server in bytes per second. Zero means unlimited. max_mutations_bandwidth_for_server {#max_mutations_bandwidth_for_server} The maximum read speed of all mutations on server in bytes per second. Zero means unlimited. max_named_collection_num_to_throw {#max_named_collection_num_to_throw} If number of named collections is greater than this value, server will throw an exception. :::note A value of 0 means no limitation. ::: Example xml <max_named_collection_num_to_throw>400</max_named_collection_num_to_throw> max_named_collection_num_to_warn {#max_named_collection_num_to_warn} If the number of named collections exceeds the specified value, clickhouse server will add warning messages to system.warnings table. Example xml <max_named_collection_num_to_warn>400</max_named_collection_num_to_warn> max_open_files {#max_open_files} The maximum number of open files. :::note We recommend using this option in macOS since the getrlimit() function returns an incorrect value. ::: Example xml <max_open_files>262144</max_open_files> max_os_cpu_wait_time_ratio_to_drop_connection {#max_os_cpu_wait_time_ratio_to_drop_connection} Max ratio between OS CPU wait (OSCPUWaitMicroseconds metric) and busy (OSCPUVirtualTimeMicroseconds metric) times to consider dropping connections. Linear interpolation between min and max ratio is used to calculate the probability, the probability is 1 at this point. See Controlling behavior on server CPU overload for more details. max_outdated_parts_loading_thread_pool_size {#max_outdated_parts_loading_thread_pool_size} The number of threads to load inactive set of data parts (Outdated ones) at startup. max_part_num_to_warn {#max_part_num_to_warn} If the number of active parts exceeds the specified value, clickhouse server will add warning messages to system.warnings table. Example xml <max_part_num_to_warn>400</max_part_num_to_warn> max_partition_size_to_drop {#max_partition_size_to_drop}
{"source_file": "settings.md"}
[ -0.005618240684270859, -0.07640688866376877, -0.12022630870342255, 0.00292671425268054, -0.03795638680458069, -0.08656883984804153, -0.034064821898937225, -0.00996728427708149, 0.01513568963855505, 0.03247067332267761, 0.023330818861722946, 0.06551896035671234, 0.015028504654765129, -0.013...
44f4e284-5d10-486b-9b20-1c8be58d95f0
Example xml <max_part_num_to_warn>400</max_part_num_to_warn> max_partition_size_to_drop {#max_partition_size_to_drop} Restriction on dropping partitions. If the size of a MergeTree table exceeds max_partition_size_to_drop (in bytes), you can't drop a partition using a DROP PARTITION query. This setting does not require a restart of the ClickHouse server to apply. Another way to disable the restriction is to create the <clickhouse-path>/flags/force_drop_table file. :::note The value 0 means that you can drop partitions without any restrictions. This limitation does not restrict drop table and truncate table, see max_table_size_to_drop ::: Example xml <max_partition_size_to_drop>0</max_partition_size_to_drop> max_parts_cleaning_thread_pool_size {#max_parts_cleaning_thread_pool_size} The number of threads for concurrent removal of inactive data parts. max_pending_mutations_execution_time_to_warn {#max_pending_mutations_execution_time_to_warn} If any of the pending mutations exceeds the specified value in seconds, clickhouse server will add warning messages to system.warnings table. Example xml <max_pending_mutations_execution_time_to_warn>10000</max_pending_mutations_execution_time_to_warn> max_pending_mutations_to_warn {#max_pending_mutations_to_warn} If the number of pending mutations exceeds the specified value, clickhouse server will add warning messages to system.warnings table. Example xml <max_pending_mutations_to_warn>400</max_pending_mutations_to_warn> max_prefixes_deserialization_thread_pool_free_size {#max_prefixes_deserialization_thread_pool_free_size} If the number of idle threads in the prefixes deserialization Thread pool exceeds max_prefixes_deserialization_thread_pool_free_size , ClickHouse will release resources occupied by idling threads and decrease the pool size. Threads can be created again if necessary. max_prefixes_deserialization_thread_pool_size {#max_prefixes_deserialization_thread_pool_size} ClickHouse uses threads from the prefixes deserialization Thread pool for parallel reading of metadata of columns and subcolumns from file prefixes in Wide parts in MergeTree. max_prefixes_deserialization_thread_pool_size limits the maximum number of threads in the pool. max_remote_read_network_bandwidth_for_server {#max_remote_read_network_bandwidth_for_server} The maximum speed of data exchange over the network in bytes per second for read. :::note A value of 0 (default) means unlimited. ::: max_remote_write_network_bandwidth_for_server {#max_remote_write_network_bandwidth_for_server} The maximum speed of data exchange over the network in bytes per second for write. :::note A value of 0 (default) means unlimited. ::: max_replicated_fetches_network_bandwidth_for_server {#max_replicated_fetches_network_bandwidth_for_server} The maximum speed of data exchange over the network in bytes per second for replicated fetches. Zero means unlimited.
{"source_file": "settings.md"}
[ 0.024406572803854942, 0.0063618686981499195, 0.038547366857528687, -0.008050578646361828, 0.0231704693287611, -0.047068919986486435, 0.021033236756920815, 0.062167685478925705, -0.04723123088479042, -0.00319859036244452, 0.03376585245132446, -0.016191858798265457, 0.026895886287093163, -0....
070faca8-af7f-4ab8-83c7-f6b4d11be337
The maximum speed of data exchange over the network in bytes per second for replicated fetches. Zero means unlimited. max_replicated_sends_network_bandwidth_for_server {#max_replicated_sends_network_bandwidth_for_server} The maximum speed of data exchange over the network in bytes per second for replicated sends. Zero means unlimited. max_replicated_table_num_to_throw {#max_replicated_table_num_to_throw} If the number of replicated tables is greater than this value, the server will throw an exception. Only counts tables for database engines: - Atomic - Ordinary - Replicated - Lazy :::note A value of 0 means no limitation. ::: Example xml <max_replicated_table_num_to_throw>400</max_replicated_table_num_to_throw> max_server_memory_usage {#max_server_memory_usage} The maximum amount of memory the server is allowed to use, expressed in bytes. :::note The maximum memory consumption of the server is further restricted by setting max_server_memory_usage_to_ram_ratio . ::: As a special case, a value of 0 (default) means the server may consume all available memory (excluding further restrictions imposed by max_server_memory_usage_to_ram_ratio ). max_server_memory_usage_to_ram_ratio {#max_server_memory_usage_to_ram_ratio} The maximum amount of memory the server is allowed to use, expressed as a ratio to all available memory. For example, a value of 0.9 (default) means that the server may consume 90% of the available memory. Allows lowering the memory usage on low-memory systems. On hosts with low RAM and swap, you may possibly need setting max_server_memory_usage_to_ram_ratio set larger than 1. :::note The maximum memory consumption of the server is further restricted by setting max_server_memory_usage . ::: max_session_timeout {#max_session_timeout} Maximum session timeout, in seconds. Example: xml <max_session_timeout>3600</max_session_timeout> max_table_num_to_throw {#max_table_num_to_throw} If number of tables is greater than this value, server will throw an exception. The following tables are not counted: - view - remote - dictionary - system Only counts tables for database engines: - Atomic - Ordinary - Replicated - Lazy :::note A value of 0 means no limitation. ::: Example xml <max_table_num_to_throw>400</max_table_num_to_throw> max_table_num_to_warn {#max_table_num_to_warn} If the number of attached tables exceeds the specified value, clickhouse server will add warning messages to system.warnings table. Example xml <max_table_num_to_warn>400</max_table_num_to_warn> max_table_size_to_drop {#max_table_size_to_drop} Restriction on deleting tables. If the size of a MergeTree table exceeds max_table_size_to_drop (in bytes), you can't delete it using a DROP query or TRUNCATE query. :::note A value of 0 means that you can delete all tables without any restrictions.
{"source_file": "settings.md"}
[ 0.0447433665394783, -0.042310405522584915, -0.07022911310195923, 0.03114941529929638, -0.09789340198040009, -0.08807279914617538, -0.03518019989132881, 0.032888416200876236, -0.0045548598282039165, 0.05990155041217804, 0.02888009138405323, 0.029340451583266258, 0.12889939546585083, -0.0602...
776ab097-90d7-452f-9f9e-f6f05c41582b
:::note A value of 0 means that you can delete all tables without any restrictions. This setting does not require a restart of the ClickHouse server to apply. Another way to disable the restriction is to create the <clickhouse-path>/flags/force_drop_table file. ::: Example xml <max_table_size_to_drop>0</max_table_size_to_drop> max_temporary_data_on_disk_size {#max_temporary_data_on_disk_size} The maximum amount of storage that could be used for external aggregation, joins or sorting. Queries that exceed this limit will fail with an exception. :::note A value of 0 means unlimited. ::: See also: - max_temporary_data_on_disk_size_for_user - max_temporary_data_on_disk_size_for_query max_thread_pool_free_size {#max_thread_pool_free_size} If the number of idle threads in the Global Thread pool is greater than max_thread_pool_free_size , then ClickHouse releases resources occupied by some threads and the pool size is decreased. Threads can be created again if necessary. Example xml <max_thread_pool_free_size>1200</max_thread_pool_free_size> max_thread_pool_size {#max_thread_pool_size} ClickHouse uses threads from the Global Thread pool to process queries. If there is no idle thread to process a query, then a new thread is created in the pool. max_thread_pool_size limits the maximum number of threads in the pool. Example xml <max_thread_pool_size>12000</max_thread_pool_size> max_unexpected_parts_loading_thread_pool_size {#max_unexpected_parts_loading_thread_pool_size} The number of threads to load inactive set of data parts (Unexpected ones) at startup. max_view_num_to_throw {#max_view_num_to_throw} If the number of views is greater than this value, the server will throw an exception. Only counts tables for database engines: - Atomic - Ordinary - Replicated - Lazy :::note A value of 0 means no limitation. ::: Example xml <max_view_num_to_throw>400</max_view_num_to_throw> max_view_num_to_warn {#max_view_num_to_warn} If the number of attached views exceeds the specified value, clickhouse server will add warning messages to system.warnings table. Example xml <max_view_num_to_warn>400</max_view_num_to_warn> max_waiting_queries {#max_waiting_queries} Limit on total number of concurrently waiting queries. Execution of a waiting query is blocked while required tables are loading asynchronously (see async_load_databases . :::note Waiting queries are not counted when limits controlled by the following settings are checked: max_concurrent_queries max_concurrent_insert_queries max_concurrent_select_queries max_concurrent_queries_for_user max_concurrent_queries_for_all_users This correction is done to avoid hitting these limits just after server startup. ::: :::note A value of 0 (default) means unlimited. This setting can be modified at runtime and will take effect immediately. Queries that are already running will remain unchanged. :::
{"source_file": "settings.md"}
[ -0.0017089671455323696, -0.016342803835868835, -0.044946931302547455, 0.02263677679002285, -0.01862853206694126, -0.05781956762075424, 0.03267963230609894, -0.0028423131443560123, -0.019933976233005524, 0.07122557610273361, 0.08787687122821808, -0.02637930028140545, 0.06792979687452316, -0...
da9cbbd1-6bdd-450f-9a9c-3f1fdac265e4
:::note A value of 0 (default) means unlimited. This setting can be modified at runtime and will take effect immediately. Queries that are already running will remain unchanged. ::: memory_worker_correct_memory_tracker {#memory_worker_correct_memory_tracker} Whether background memory worker should correct internal memory tracker based on the information from external sources like jemalloc and cgroups memory_worker_period_ms {#memory_worker_period_ms} Tick period of background memory worker which corrects memory tracker memory usages and cleans up unused pages during higher memory usage. If set to 0, default value will be used depending on the memory usage source memory_worker_use_cgroup {#memory_worker_use_cgroup} Use current cgroup memory usage information to correct memory tracking. merge_tree {#merge_tree} Fine-tuning for tables in the MergeTree . For more information, see the MergeTreeSettings.h header file. Example xml <merge_tree> <max_suspicious_broken_parts>5</max_suspicious_broken_parts> </merge_tree> merge_workload {#merge_workload} Used to regulate how resources are utilized and shared between merges and other workloads. Specified value is used as workload setting value for all background merges. Can be overridden by a merge tree setting. See Also - Workload Scheduling merges_mutations_memory_usage_soft_limit {#merges_mutations_memory_usage_soft_limit} Sets the limit on how much RAM is allowed to use for performing merge and mutation operations. If ClickHouse reaches the limit set, it won't schedule any new background merge or mutation operations but will continue to execute already scheduled tasks. :::note A value of 0 means unlimited. ::: Example xml <merges_mutations_memory_usage_soft_limit>0</merges_mutations_memory_usage_soft_limit> merges_mutations_memory_usage_to_ram_ratio {#merges_mutations_memory_usage_to_ram_ratio} The default merges_mutations_memory_usage_soft_limit value is calculated as memory_amount * merges_mutations_memory_usage_to_ram_ratio . See also: max_memory_usage merges_mutations_memory_usage_soft_limit metric_log {#metric_log} It is disabled by default. Enabling To manually turn on metrics history collection system.metric_log , create /etc/clickhouse-server/config.d/metric_log.xml with the following content: xml <clickhouse> <metric_log> <database>system</database> <table>metric_log</table> <flush_interval_milliseconds>7500</flush_interval_milliseconds> <collect_interval_milliseconds>1000</collect_interval_milliseconds> <max_size_rows>1048576</max_size_rows> <reserved_size_rows>8192</reserved_size_rows> <buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold> <flush_on_crash>false</flush_on_crash> </metric_log> </clickhouse> Disabling
{"source_file": "settings.md"}
[ 0.021695811301469803, -0.02021155320107937, -0.08768461644649506, 0.03835710510611534, -0.02935127727687359, -0.0460621640086174, 0.0179132129997015, 0.05856341868638992, -0.05550745502114296, 0.020671050995588303, 0.09173395484685898, 0.023470986634492874, 0.0030920901335775852, -0.055851...
1eea971a-5a24-49b0-97c7-3e38c7c9423a
Disabling To disable metric_log setting, you should create the following file /etc/clickhouse-server/config.d/disable_metric_log.xml with the following content: xml <clickhouse> <metric_log remove="1" /> </clickhouse> min_os_cpu_wait_time_ratio_to_drop_connection {#min_os_cpu_wait_time_ratio_to_drop_connection} Min ratio between OS CPU wait (OSCPUWaitMicroseconds metric) and busy (OSCPUVirtualTimeMicroseconds metric) times to consider dropping connections. Linear interpolation between min and max ratio is used to calculate the probability, the probability is 0 at this point. See Controlling behavior on server CPU overload for more details. mlock_executable {#mlock_executable} Perform mlockall after startup to lower first queries latency and to prevent clickhouse executable from being paged out under high IO load. :::note Enabling this option is recommended but will lead to increased startup time for up to a few seconds. Keep in mind that this setting would not work without "CAP_IPC_LOCK" capability. ::: Example xml <mlock_executable>false</mlock_executable> mmap_cache_size {#mmap_cache_size} This setting allows avoiding frequent open/close calls (which are very expensive due to consequent page faults), and to reuse mappings from several threads and queries. The setting value is the number of mapped regions (usually equal to the number of mapped files). The amount of data in mapped files can be monitored in the following system tables with the following metrics: MMappedFiles / MMappedFileBytes / MMapCacheCells in system.metrics , system.metric_log CreatedReadBufferMMap / CreatedReadBufferMMapFailed / MMappedFileCacheHits / MMappedFileCacheMisses in system.events , system.processes , system.query_log , system.query_thread_log , system.query_views_log :::note The amount of data in mapped files does not consume memory directly and is not accounted for in query or server memory usage — because this memory can be discarded similar to the OS page cache. The cache is dropped (the files are closed) automatically on the removal of old parts in tables of the MergeTree family, also it can be dropped manually by the SYSTEM DROP MMAP CACHE query. This setting can be modified at runtime and will take effect immediately. ::: mutation_workload {#mutation_workload} Used to regulate how resources are utilized and shared between mutations and other workloads. Specified value is used as workload setting value for all background mutations. Can be overridden by a merge tree setting. See Also - Workload Scheduling mysql_port {#mysql_port} Port for communicating with clients over MySQL protocol. :::note - Positive integers specify the port number to listen to - Empty values are used to disable communication with clients over MySQL protocol. ::: Example xml <mysql_port>9004</mysql_port> mysql_require_secure_transport {#mysql_require_secure_transport}
{"source_file": "settings.md"}
[ 0.010286170057952404, -0.056907378137111664, 0.000005975383828626946, 0.05724122375249863, -0.026130490005016327, -0.07556049525737762, -0.020896853879094124, -0.036462780088186264, 0.04185859113931656, -0.04558795318007469, 0.015400286763906479, -0.001356153399683535, -0.06752409040927887, ...
169e9d92-bc99-42e3-86ab-7928d8e2f135
Example xml <mysql_port>9004</mysql_port> mysql_require_secure_transport {#mysql_require_secure_transport} If set to true, secure communication is required with clients over mysql_port . Connection with option --ssl-mode=none will be refused. Use it with OpenSSL settings. openSSL {#openssl} SSL client/server configuration. Support for SSL is provided by the libpoco library. The available configuration options are explained in SSLManager.h . Default values can be found in SSLManager.cpp . Keys for server/client settings:
{"source_file": "settings.md"}
[ 0.0545160211622715, 0.04619310051202774, -0.0721714124083519, -0.005768399219959974, -0.12295025587081909, -0.02801322750747204, -0.014025074429810047, 0.012465271167457104, 0.014076740480959415, -0.09541519731283188, 0.019623292610049248, -0.025910744443535805, 0.1455710083246231, 0.04461...
ac8c7165-b67e-4c21-bcc9-30a4da2ce094
| Option | Description | Default Value | |-------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------| | privateKeyFile | Path to the file with the secret key of the PEM certificate. The file may contain a key and certificate at the same time. | | | certificateFile | Path to the client/server certificate file in PEM format. You can omit it if privateKeyFile contains the certificate. | | | caConfig | Path to the file or directory that contains trusted CA certificates. If this points to a file, it must be in PEM format and can contain several CA certificates. If this points to a directory, it must contain one .pem file per CA certificate. The filenames are looked up by the CA subject name hash value. Details can be found in the man page of SSL_CTX_load_verify_locations . | | | verificationMode | The method for checking the node's certificates. Details are in the description of the Context class. Possible values: none , relaxed , strict , once . |
{"source_file": "settings.md"}
[ 0.0203523188829422, 0.06400753557682037, -0.002552712569013238, 0.014790572226047516, -0.03682645037770271, 0.05652039125561714, 0.037989646196365356, 0.06060933694243431, 0.035907600075006485, -0.03890528529882431, 0.03423536196351051, -0.07793506979942322, -0.054630763828754425, -0.02937...
e0f33ff7-6bea-43e9-bca7-4a0c7ff62f44
relaxed | | verificationDepth | The maximum length of the verification chain. Verification will fail if the certificate chain length exceeds the set value. | 9 | | loadDefaultCAFile | Wether built-in CA certificates for OpenSSL will be used. ClickHouse assumes that builtin CA certificates are in the file /etc/ssl/cert.pem (resp. the directory /etc/ssl/certs ) or in file (resp. directory) specified by the environment variable SSL_CERT_FILE (resp. SSL_CERT_DIR ). | true | | cipherList | Supported OpenSSL encryptions. | ALL:!ADH:!LOW:!EXP:!MD5:!3DES:@STRENGTH | | cacheSessions | Enables or disables caching sessions. Must be used in combination with sessionIdContext . Acceptable values: true , false . | false | | sessionIdContext | A unique set of random characters that the server appends to each generated identifier. The length of the string must not exceed SSL_MAX_SSL_SESSION_ID_LENGTH . This parameter is always recommended since it helps avoid problems both if the server caches the session and if the client requested caching. | $\{application.name\} | | sessionCacheSize | The maximum number of sessions that the server caches. A value of 0
{"source_file": "settings.md"}
[ -0.0697641521692276, 0.06882960349321365, -0.09002316743135452, -0.0042588552460074425, -0.01894000731408596, -0.05916168913245201, -0.006631026044487953, -0.01821085624396801, -0.028302129358053207, -0.03567812591791153, 0.02187463641166687, -0.02011077105998993, 0.04107636213302612, 0.02...
a3bff434-636d-46a4-bebc-00d74f4d43e6
$\{application.name\} | | sessionCacheSize | The maximum number of sessions that the server caches. A value of 0 means unlimited sessions. | 1024*20 | | sessionTimeout | Time for caching the session on the server in hours. | 2 | | extendedVerification | If enabled, verify that the certificate CN or SAN matches the peer hostname. | false | | requireTLSv1 | Require a TLSv1 connection. Acceptable values: true , false . | false | | requireTLSv1_1 | Require a TLSv1.1 connection. Acceptable values: true , false . | false | | requireTLSv1_2 | Require a TLSv1.2 connection. Acceptable values: true , false
{"source_file": "settings.md"}
[ -0.006283105351030827, 0.07016214728355408, -0.02281412109732628, -0.029571667313575745, -0.05344400927424431, -0.08919686824083328, -0.006939203478395939, -0.019595099613070488, 0.006636491511017084, 0.0011496980441734195, -0.04137345030903816, -0.03720587491989136, 0.029378846287727356, ...
95c0d6a3-6e17-4990-bd99-3b2e42eabd24
false | | requireTLSv1_2 | Require a TLSv1.2 connection. Acceptable values: true , false . | false | | fips | Activates OpenSSL FIPS mode. Supported if the library's OpenSSL version supports FIPS. | false | | privateKeyPassphraseHandler | Class (PrivateKeyPassphraseHandler subclass) that requests the passphrase for accessing the private key. For example: <privateKeyPassphraseHandler> , <name>KeyFileHandler</name> , <options><password>test</password></options> , </privateKeyPassphraseHandler> . | KeyConsoleHandler | | invalidCertificateHandler | Class (a subclass of CertificateHandler) for verifying invalid certificates. For example: <invalidCertificateHandler> <name>RejectCertificateHandler</name> </invalidCertificateHandler> . | RejectCertificateHandler | | disableProtocols | Protocols that are not allowed to be used. | | | preferServerCiphers
{"source_file": "settings.md"}
[ -0.08799949288368225, -0.0005777428741566837, -0.03568940609693527, -0.014215610921382904, 0.01928301900625229, -0.05453566461801529, -0.038602013140916824, -0.027570517733693123, 0.029224269092082977, -0.04543226957321167, 0.03970231115818024, -0.026971101760864258, 0.06333685666322708, -...
3d497a4a-3dce-4bad-aafd-b98641e93076
| preferServerCiphers | Client-preferred server ciphers. | false |
{"source_file": "settings.md"}
[ -0.0318325012922287, 0.019947687163949013, -0.01512965653091669, -0.008809790946543217, -0.008468699641525745, 0.0006324758869595826, 0.003209087997674942, -0.07620897889137268, 0.03749625012278557, 0.01567729562520981, -0.002838794607669115, 0.006883712951093912, 0.08411264419555664, 0.05...
f1994f6d-37ce-434c-897c-ce95ca77a17a
Example of settings: xml <openSSL> <server> <!-- openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/clickhouse-server/server.key -out /etc/clickhouse-server/server.crt --> <certificateFile>/etc/clickhouse-server/server.crt</certificateFile> <privateKeyFile>/etc/clickhouse-server/server.key</privateKeyFile> <!-- openssl dhparam -out /etc/clickhouse-server/dhparam.pem 4096 --> <dhParamsFile>/etc/clickhouse-server/dhparam.pem</dhParamsFile> <verificationMode>none</verificationMode> <loadDefaultCAFile>true</loadDefaultCAFile> <cacheSessions>true</cacheSessions> <disableProtocols>sslv2,sslv3</disableProtocols> <preferServerCiphers>true</preferServerCiphers> </server> <client> <loadDefaultCAFile>true</loadDefaultCAFile> <cacheSessions>true</cacheSessions> <disableProtocols>sslv2,sslv3</disableProtocols> <preferServerCiphers>true</preferServerCiphers> <!-- Use for self-signed: <verificationMode>none</verificationMode> --> <invalidCertificateHandler> <!-- Use for self-signed: <name>AcceptCertificateHandler</name> --> <name>RejectCertificateHandler</name> </invalidCertificateHandler> </client> </openSSL> opentelemetry_span_log {#opentelemetry_span_log} Settings for the opentelemetry_span_log system table. Example: xml <opentelemetry_span_log> <engine> engine MergeTree partition by toYYYYMM(finish_date) order by (finish_date, finish_time_us, trace_id) </engine> <database>system</database> <table>opentelemetry_span_log</table> <flush_interval_milliseconds>7500</flush_interval_milliseconds> <max_size_rows>1048576</max_size_rows> <reserved_size_rows>8192</reserved_size_rows> <buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold> <flush_on_crash>false</flush_on_crash> </opentelemetry_span_log> os_cpu_busy_time_threshold {#os_cpu_busy_time_threshold} Threshold of OS CPU busy time in microseconds (OSCPUVirtualTimeMicroseconds metric) to consider CPU doing some useful work, no CPU overload would be considered if busy time was below this value. os_threads_nice_value_distributed_cache_tcp_handler {#os_threads_nice_value_distributed_cache_tcp_handler} Linux nice value for the threads of distributed cache TCP handler. Lower values mean higher CPU priority. Requires CAP_SYS_NICE capability, otherwise no-op. Possible values: -20 to 19. os_threads_nice_value_merge_mutate {#os_threads_nice_value_merge_mutate} Linux nice value for merge and mutation threads. Lower values mean higher CPU priority. Requires CAP_SYS_NICE capability, otherwise no-op. Possible values: -20 to 19. os_threads_nice_value_zookeeper_client_send_receive {#os_threads_nice_value_zookeeper_client_send_receive}
{"source_file": "settings.md"}
[ 0.0006820684648118913, 0.004311383236199617, -0.04825456067919731, -0.020902425050735474, -0.03444121405482292, -0.08362539857625961, -0.09486450999975204, -0.09620895236730576, 0.009437418542802334, -0.0431487038731575, 0.07688096165657043, -0.006594827398657799, 0.015756305307149887, 0.0...
d83c52f6-01c9-4083-9076-7cd8a33efb72
Requires CAP_SYS_NICE capability, otherwise no-op. Possible values: -20 to 19. os_threads_nice_value_zookeeper_client_send_receive {#os_threads_nice_value_zookeeper_client_send_receive} Linux nice value for send and receive threads in ZooKeeper client. Lower values mean higher CPU priority. Requires CAP_SYS_NICE capability, otherwise no-op. Possible values: -20 to 19. page_cache_free_memory_ratio {#page_cache_free_memory_ratio} Fraction of the memory limit to keep free from the userspace page cache. Analogous to Linux min_free_kbytes setting. page_cache_history_window_ms {#page_cache_history_window_ms} Delay before freed memory can be used by userspace page cache. page_cache_max_size {#page_cache_max_size} Maximum size of the userspace page cache. Set to 0 to disable the cache. If greater than page_cache_min_size, the cache size will be continuously adjusted within this range, to use most of the available memory while keeping the total memory usage below the limit (max_server_memory_usage[_to_ram_ratio]). page_cache_min_size {#page_cache_min_size} Minimum size of the userspace page cache. page_cache_policy {#page_cache_policy} Userspace page cache policy name. page_cache_shards {#page_cache_shards} Stripe userspace page cache over this many shards to reduce mutex contention. Experimental, not likely to improve performance. page_cache_size_ratio {#page_cache_size_ratio} The size of the protected queue in the userspace page cache relative to the cache's total size. part_log {#part_log} Logging events that are associated with MergeTree . For instance, adding or merging data. You can use the log to simulate merge algorithms and compare their characteristics. You can visualize the merge process. Queries are logged in the system.part_log table, not in a separate file. You can configure the name of this table in the table parameter (see below). Example xml <part_log> <database>system</database> <table>part_log</table> <partition_by>toMonday(event_date)</partition_by> <flush_interval_milliseconds>7500</flush_interval_milliseconds> <max_size_rows>1048576</max_size_rows> <reserved_size_rows>8192</reserved_size_rows> <buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold> <flush_on_crash>false</flush_on_crash> </part_log> parts_kill_delay_period {#parts_kill_delay_period} Period to completely remove parts for SharedMergeTree. Only available in ClickHouse Cloud parts_kill_delay_period_random_add {#parts_kill_delay_period_random_add} Add uniformly distributed value from 0 to x seconds to kill_delay_period to avoid thundering herd effect and subsequent DoS of ZooKeeper in case of very large number of tables. Only available in ClickHouse Cloud parts_killer_pool_size {#parts_killer_pool_size} Threads for cleanup of shared merge tree outdated threads. Only available in ClickHouse Cloud path {#path}
{"source_file": "settings.md"}
[ 0.00949961319565773, 0.02109447307884693, -0.05450276657938957, 0.03038552775979042, -0.005147627554833889, -0.047163430601358414, 0.021106641739606857, 0.03716125711798668, -0.0030824383720755577, 0.051031481474637985, 0.00607399782165885, 0.030951518565416336, -0.014633601531386375, -0.0...
47e5090f-0d0a-4819-8e58-9b28f22161d2
parts_killer_pool_size {#parts_killer_pool_size} Threads for cleanup of shared merge tree outdated threads. Only available in ClickHouse Cloud path {#path} The path to the directory containing data. :::note The trailing slash is mandatory. ::: Example xml <path>/var/lib/clickhouse/</path> postgresql_port {#postgresql_port} Port for communicating with clients over PostgreSQL protocol. :::note - Positive integers specify the port number to listen to - Empty values are used to disable communication with clients over PostgreSQL protocol. ::: Example xml <postgresql_port>9005</postgresql_port> postgresql_require_secure_transport {#postgresql_require_secure_transport} If set to true, secure communication is required with clients over postgresql_port . Connection with option sslmode=disable will be refused. Use it with OpenSSL settings. prefetch_threadpool_pool_size {#prefetch_threadpool_pool_size} Size of background pool for prefetches for remote object storages prefetch_threadpool_queue_size {#prefetch_threadpool_queue_size} Number of tasks which is possible to push into prefetches pool prefixes_deserialization_thread_pool_thread_pool_queue_size {#prefixes_deserialization_thread_pool_thread_pool_queue_size} The maximum number of jobs that can be scheduled on the prefixes deserialization Thread pool. :::note A value of 0 means unlimited. ::: prepare_system_log_tables_on_startup {#prepare_system_log_tables_on_startup} If true, ClickHouse creates all configured system.*_log tables before the startup. It can be helpful if some startup scripts depend on these tables. primary_index_cache_policy {#primary_index_cache_policy} Primary index cache policy name. primary_index_cache_prewarm_ratio {#primary_index_cache_prewarm_ratio} The ratio of total size of mark cache to fill during prewarm. primary_index_cache_size {#primary_index_cache_size} Maximum size of cache for primary index (index of MergeTree family of tables). primary_index_cache_size_ratio {#primary_index_cache_size_ratio} The size of the protected queue (in case of SLRU policy) in the primary index cache relative to the cache's total size. process_query_plan_packet {#process_query_plan_packet} This setting allows reading QueryPlan packet. This packet is sent for distributed queries when serialize_query_plan is enabled. Disabled by default to avoid possible security issues which can be caused by bugs in query plan binary deserialization. Example xml <process_query_plan_packet>true</process_query_plan_packet> processors_profile_log {#processors_profile_log} Settings for the processors_profile_log system table. The default settings are:
{"source_file": "settings.md"}
[ 0.020076023414731026, 0.008254949934780598, -0.052851006388664246, -0.029878167435526848, -0.040549956262111664, -0.05425495281815529, 0.003045408520847559, -0.054392505437135696, 0.0032482075039297342, -0.017489386722445488, 0.017495565116405487, 0.019371725618839264, -0.024618860334157944,...
8cf603ac-757a-4317-8940-be08da2d5769
processors_profile_log {#processors_profile_log} Settings for the processors_profile_log system table. The default settings are: xml <processors_profile_log> <database>system</database> <table>processors_profile_log</table> <partition_by>toYYYYMM(event_date)</partition_by> <flush_interval_milliseconds>7500</flush_interval_milliseconds> <max_size_rows>1048576</max_size_rows> <reserved_size_rows>8192</reserved_size_rows> <buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold> <flush_on_crash>false</flush_on_crash> </processors_profile_log> prometheus {#prometheus} Exposing metrics data for scraping from Prometheus . Settings: endpoint – HTTP endpoint for scraping metrics by prometheus server. Start from '/'. port – Port for endpoint . metrics – Expose metrics from the system.metrics table. events – Expose metrics from the system.events table. asynchronous_metrics – Expose current metrics values from the system.asynchronous_metrics table. errors - Expose the number of errors by error codes occurred since the last server restart. This information could be obtained from the system.errors as well. Example xml <clickhouse> <listen_host>0.0.0.0</listen_host> <http_port>8123</http_port> <tcp_port>9000</tcp_port> <!-- highlight-start --> <prometheus> <endpoint>/metrics</endpoint> <port>9363</port> <metrics>true</metrics> <events>true</events> <asynchronous_metrics>true</asynchronous_metrics> <errors>true</errors> </prometheus> <!-- highlight-end --> </clickhouse> Check (replace 127.0.0.1 with the IP addr or hostname of your ClickHouse server): bash curl 127.0.0.1:9363/metrics proxy {#proxy} Define proxy servers for HTTP and HTTPS requests, currently supported by S3 storage, S3 table functions, and URL functions. There are three ways to define proxy servers: - environment variables - proxy lists - remote proxy resolvers. Bypassing proxy servers for specific hosts is also supported with the use of no_proxy . Environment variables The http_proxy and https_proxy environment variables allow you to specify a proxy server for a given protocol. If you have it set on your system, it should work seamlessly. This is the simplest approach if a given protocol has only one proxy server and that proxy server doesn't change. Proxy lists This approach allows you to specify one or more proxy servers for a protocol. If more than one proxy server is defined, ClickHouse uses the different proxies on a round-robin basis, balancing the load across the servers. This is the simplest approach if there is more than one proxy server for a protocol and the list of proxy servers doesn't change. Configuration template
{"source_file": "settings.md"}
[ 0.016647426411509514, -0.009087136946618557, -0.06917019188404083, 0.028862083330750465, -0.02139328233897686, -0.1286800652742386, -0.038111791014671326, 0.029354168102145195, -0.046940673142671585, 0.02365322969853878, 0.06195622682571411, -0.041188642382621765, -0.00020061763643752784, ...
a3998c96-20c0-4e3a-9e9d-f0cae0f9aa87
Configuration template xml <proxy> <http> <uri>http://proxy1</uri> <uri>http://proxy2:3128</uri> </http> <https> <uri>http://proxy1:3128</uri> </https> </proxy> Select a parent field in the tabs below to view their children: | Field | Description | |-----------|-------------------------------------| | <http> | A list of one or more HTTP proxies | | <https> | A list of one or more HTTPS proxies | | Field | Description | |---------|----------------------| | <uri> | The URI of the proxy | Remote proxy resolvers It's possible that the proxy servers change dynamically. In that case, you can define the endpoint of a resolver. ClickHouse sends an empty GET request to that endpoint, the remote resolver should return the proxy host. ClickHouse will use it to form the proxy URI using the following template: \{proxy_scheme\}://\{proxy_host\}:{proxy_port} Configuration template ```xml http://resolver:8080/hostname http 80 10 <https> <resolver> <endpoint>http://resolver:8080/hostname</endpoint> <proxy_scheme>http</proxy_scheme> <proxy_port>3128</proxy_port> <proxy_cache_time>10</proxy_cache_time> </resolver> </https> ``` Select a parent field in the tabs below to view their children: | Field | Description | |----------|----------------------------------| | <http> | A list of one or more resolvers | | <https> | A list of one or more resolvers | | Field | Description | |-------------|-----------------------------------------------| | <resolver> | The endpoint and other details for a resolver | :::note You can have multiple <resolver> elements, but only the first <resolver> for a given protocol is used. Any other <resolver> elements for that protocol are ignored. That means load balancing (if needed) should be implemented by the remote resolver. :::
{"source_file": "settings.md"}
[ -0.05240130051970482, 0.02434629015624523, 0.0018829845357686281, -0.0006037911516614258, -0.07525593042373657, -0.02907404489815235, -0.028153665363788605, -0.04001805931329727, 0.019351884722709656, -0.027539221569895744, -0.008002170361578465, -0.015886709094047546, 0.03709716349840164, ...
5a5cdd66-278f-441e-9046-1ac8ca8a8919
<resolver> for a given protocol is used. Any other <resolver> elements for that protocol are ignored. That means load balancing (if needed) should be implemented by the remote resolver. ::: | Field | Description | |---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <endpoint> | The URI of the proxy resolver | | <proxy_scheme> | The protocol of the final proxy URI. This can be either http or https . | | <proxy_port> | The port number of the proxy resolver | | <proxy_cache_time> | The time in seconds that values from the resolver should be cached by ClickHouse. Setting this value to 0 causes ClickHouse to contact the resolver for every HTTP or HTTPS request. | Precedence Proxy settings are determined in the following order: | Order | Setting | |-------|------------------------| | 1. | Remote proxy resolvers | | 2. | Proxy lists | | 3. | Environment variables | ClickHouse will check the highest priority resolver type for the request protocol. If it is not defined, it will check the next highest priority resolver type, until it reaches the environment resolver. This also allows a mix of resolver types can be used. query_cache {#query_cache} Query cache configuration. The following settings are available: | Setting | Description | Default Value | |---------------------------|----------------------------------------------------------------------------------------|---------------| | max_size_in_bytes | The maximum cache size in bytes. 0 means the query cache is disabled. | 1073741824 | | max_entries | The maximum number of SELECT query results stored in the cache. | 1024 | | max_entry_size_in_bytes | The maximum size in bytes SELECT query results may have to be saved in the cache. | 1048576 | | max_entry_size_in_rows | The maximum number of rows SELECT query results may have to be saved in the cache. | 30000000 |
{"source_file": "settings.md"}
[ -0.08646184951066971, 0.038376644253730774, -0.021228384226560593, -0.010281804017722607, -0.1336093544960022, -0.06626792252063751, -0.05079187825322151, 0.03662065416574478, 0.03847261518239975, 0.010364765301346779, -0.054261695593595505, -0.02411399409174919, 0.062396544963121414, -0.0...
44cc0dec-1397-4f82-84f0-bb290b224dc5
:::note - Changed settings take effect immediately. - Data for the query cache is allocated in DRAM. If memory is scarce, make sure to set a small value for max_size_in_bytes or disable the query cache altogether. ::: Example xml <query_cache> <max_size_in_bytes>1073741824</max_size_in_bytes> <max_entries>1024</max_entries> <max_entry_size_in_bytes>1048576</max_entry_size_in_bytes> <max_entry_size_in_rows>30000000</max_entry_size_in_rows> </query_cache> query_condition_cache_policy {#query_condition_cache_policy} Query condition cache policy name. query_condition_cache_size {#query_condition_cache_size} Maximum size of the query condition cache. :::note This setting can be modified at runtime and will take effect immediately. ::: query_condition_cache_size_ratio {#query_condition_cache_size_ratio} The size of the protected queue (in case of SLRU policy) in the query condition cache relative to the cache's total size. query_log {#query_log} Setting for logging queries received with the log_queries=1 setting. Queries are logged in the system.query_log table, not in a separate file. You can change the name of the table in the table parameter (see below). If the table does not exist, ClickHouse will create it. If the structure of the query log changed when the ClickHouse server was updated, the table with the old structure is renamed, and a new table is created automatically. Example xml <query_log> <database>system</database> <table>query_log</table> <engine>Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + INTERVAL 30 day</engine> <flush_interval_milliseconds>7500</flush_interval_milliseconds> <max_size_rows>1048576</max_size_rows> <reserved_size_rows>8192</reserved_size_rows> <buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold> <flush_on_crash>false</flush_on_crash> </query_log> query_masking_rules {#query_masking_rules} Regexp-based rules, which will be applied to queries as well as all log messages before storing them in server logs, system.query_log , system.text_log , system.processes tables, and in logs sent to the client. That allows preventing sensitive data leakage from SQL queries such as names, emails, personal identifiers or credit card numbers to logs. Example xml <query_masking_rules> <rule> <name>hide SSN</name> <regexp>(^|\D)\d{3}-\d{2}-\d{4}($|\D)</regexp> <replace>000-00-0000</replace> </rule> </query_masking_rules> Config fields :
{"source_file": "settings.md"}
[ -0.013881963677704334, -0.0022838888689875603, -0.08212042599916458, 0.06052281707525253, -0.09261929988861084, -0.018174435943365097, 0.009179876185953617, 0.015107899904251099, -0.06398524343967438, 0.0330391563475132, 0.013137961737811565, 0.010911474004387856, -0.004364887252449989, -0...
57b3c11c-b95a-4624-afe3-c38143f8028a
Config fields : | Setting | Description | |-----------|-------------------------------------------------------------------------------| | name | name for the rule (optional) | | regexp | RE2 compatible regular expression (mandatory) | | replace | substitution string for sensitive data (optional, by default - six asterisks) | The masking rules are applied to the whole query (to prevent leaks of sensitive data from malformed / non-parseable queries). The system.events table has counter QueryMaskingRulesMatch which has an overall number of query masking rules matches. For distributed queries each server has to be configured separately, otherwise, subqueries passed to other nodes will be stored without masking. query_metric_log {#query_metric_log} It is disabled by default. Enabling To manually turn on metrics history collection system.query_metric_log , create /etc/clickhouse-server/config.d/query_metric_log.xml with the following content: xml <clickhouse> <query_metric_log> <database>system</database> <table>query_metric_log</table> <flush_interval_milliseconds>7500</flush_interval_milliseconds> <collect_interval_milliseconds>1000</collect_interval_milliseconds> <max_size_rows>1048576</max_size_rows> <reserved_size_rows>8192</reserved_size_rows> <buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold> <flush_on_crash>false</flush_on_crash> </query_metric_log> </clickhouse> Disabling To disable query_metric_log setting, you should create the following file /etc/clickhouse-server/config.d/disable_query_metric_log.xml with the following content: xml <clickhouse> <query_metric_log remove="1" /> </clickhouse> query_thread_log {#query_thread_log} Setting for logging threads of queries received with the log_query_threads=1 setting. Queries are logged in the system.query_thread_log table, not in a separate file. You can change the name of the table in the table parameter (see below). If the table does not exist, ClickHouse will create it. If the structure of the query thread log changed when the ClickHouse server was updated, the table with the old structure is renamed, and a new table is created automatically. Example xml <query_thread_log> <database>system</database> <table>query_thread_log</table> <partition_by>toMonday(event_date)</partition_by> <flush_interval_milliseconds>7500</flush_interval_milliseconds> <max_size_rows>1048576</max_size_rows> <reserved_size_rows>8192</reserved_size_rows> <buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold> <flush_on_crash>false</flush_on_crash> </query_thread_log> query_views_log {#query_views_log}
{"source_file": "settings.md"}
[ -0.029706604778766632, -0.006811574101448059, -0.045703668147325516, 0.06879401952028275, -0.051031049340963364, -0.04027971625328064, 0.055815134197473526, -0.01191931776702404, 0.04923122748732567, 0.009686260484158993, -0.003996431361883879, -0.09526021778583527, 0.10596773773431778, -0...
775655c3-d842-46c0-b3ae-2eff4fabc136
query_views_log {#query_views_log} Setting for logging views (live, materialized etc) dependant of queries received with the log_query_views=1 setting. Queries are logged in the system.query_views_log table, not in a separate file. You can change the name of the table in the table parameter (see below). If the table does not exist, ClickHouse will create it. If the structure of the query views log changed when the ClickHouse server was updated, the table with the old structure is renamed, and a new table is created automatically. Example xml <query_views_log> <database>system</database> <table>query_views_log</table> <partition_by>toYYYYMM(event_date)</partition_by> <flush_interval_milliseconds>7500</flush_interval_milliseconds> <max_size_rows>1048576</max_size_rows> <reserved_size_rows>8192</reserved_size_rows> <buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold> <flush_on_crash>false</flush_on_crash> </query_views_log> remap_executable {#remap_executable} Setting to reallocate memory for machine code ("text") using huge pages. :::note This feature is highly experimental. ::: Example: xml <remap_executable>false</remap_executable> remote_servers {#remote_servers} Configuration of clusters used by the Distributed table engine and by the cluster table function. Example xml <remote_servers incl="clickhouse_remote_servers" /> For the value of the incl attribute, see the section " Configuration files ". See Also skip_unavailable_shards Cluster Discovery Replicated database engine remote_url_allow_hosts {#remote_url_allow_hosts} List of hosts which are allowed to be used in URL-related storage engines and table functions. When adding a host with the \<host\> xml tag: - it should be specified exactly as in the URL, as the name is checked before DNS resolution. For example: <host>clickhouse.com</host> - if the port is explicitly specified in the URL, then host:port is checked as a whole. For example: <host>clickhouse.com:80</host> - if the host is specified without a port, then any port of the host is allowed. For example: if <host>clickhouse.com</host> is specified then clickhouse.com:20 (FTP), clickhouse.com:80 (HTTP), clickhouse.com:443 (HTTPS) etc are allowed. - if the host is specified as an IP address, then it is checked as specified in the URL. For example: [2a02:6b8:a::a] . - if there are redirects and support for redirects is enabled, then every redirect (the location field) is checked. For example: sql <remote_url_allow_hosts> <host>clickhouse.com</host> </remote_url_allow_hosts> replica_group_name {#replica_group_name} Replica group name for database Replicated. The cluster created by Replicated database will consist of replicas in the same group. DDL queries will only wait for the replicas in the same group. Empty by default. Example xml <replica_group_name>backups</replica_group_name>
{"source_file": "settings.md"}
[ 0.024872353300452232, -0.11469611525535583, -0.0322817899286747, 0.0396367684006691, -0.024438846856355667, -0.0610823892056942, 0.06345558166503906, -0.07494258880615234, 0.026851730421185493, 0.02294609323143959, 0.04106210172176361, -0.020932737737894058, 0.03112182952463627, -0.0243340...
b9909bf8-57a5-4be0-9d02-3187660ce59b
Empty by default. Example xml <replica_group_name>backups</replica_group_name> replicated_fetches_http_connection_timeout {#replicated_fetches_http_connection_timeout} HTTP connection timeout for part fetch requests. Inherited from default profile http_connection_timeout if not set explicitly. replicated_fetches_http_receive_timeout {#replicated_fetches_http_receive_timeout} HTTP receive timeout for fetch part requests. Inherited from default profile http_receive_timeout if not set explicitly. replicated_fetches_http_send_timeout {#replicated_fetches_http_send_timeout} HTTP send timeout for part fetch requests. Inherited from default profile http_send_timeout if not set explicitly. replicated_merge_tree {#replicated_merge_tree} Fine-tuning for tables in the ReplicatedMergeTree . This setting has a higher priority. For more information, see the MergeTreeSettings.h header file. Example xml <replicated_merge_tree> <max_suspicious_broken_parts>5</max_suspicious_broken_parts> </replicated_merge_tree> restore_threads {#restore_threads} The maximum number of threads to execute RESTORE requests. s3_max_redirects {#s3_max_redirects} Max number of S3 redirects hops allowed. s3_retry_attempts {#s3_retry_attempts} Setting for Aws::Client::RetryStrategy, Aws::Client does retries itself, 0 means no retries s3queue_disable_streaming {#s3queue_disable_streaming} Disable streaming in S3Queue even if the table is created and there are attached materiaized views s3queue_log {#s3queue_log} Settings for the s3queue_log system table. The default settings are: xml <s3queue_log> <database>system</database> <table>s3queue_log</table> <partition_by>toYYYYMM(event_date)</partition_by> <flush_interval_milliseconds>7500</flush_interval_milliseconds> </s3queue_log> send_crash_reports {#send_crash_reports} Settings for sending of crash reports to the ClickHouse core developers team. Enabling it, especially in pre-production environments, is highly appreciated. Keys: | Key | Description | |-----------------------|--------------------------------------------------------------------------------------------------------------------------------------| | enabled | Boolean flag to enable the feature, true by default. Set to false to avoid sending crash reports. | | send_logical_errors | LOGICAL_ERROR is like an assert , it is a bug in ClickHouse. This boolean flag enables sending this exceptions (Default: true ). | | endpoint | You can override the endpoint URL for sending crash reports. | Recommended usage xml <send_crash_reports> <enabled>true</enabled> </send_crash_reports>
{"source_file": "settings.md"}
[ -0.010424933396279812, -0.002400508616119623, 0.012539413757622242, 0.028842126950621605, -0.017276423051953316, -0.11295599490404129, -0.11448604613542557, -0.00944532174617052, 0.012891135178506374, 0.02489110641181469, 0.06172555685043335, 0.0057021272368729115, 0.0533871203660965, -0.1...
a6697f9f-ca01-46e0-8db1-d637d0d51ebb
Recommended usage xml <send_crash_reports> <enabled>true</enabled> </send_crash_reports> series_keeper_path {#series_keeper_path} Path in Keeper with auto-incremental numbers, generated by the generateSerialID function. Each series will be a node under this path. show_addresses_in_stack_traces {#show_addresses_in_stack_traces} If it is set true will show addresses in stack traces shutdown_wait_backups_and_restores {#shutdown_wait_backups_and_restores} If set to true ClickHouse will wait for running backups and restores to finish before shutdown. shutdown_wait_unfinished {#shutdown_wait_unfinished} Delay in seconds to wait for unfinished queries shutdown_wait_unfinished_queries {#shutdown_wait_unfinished_queries} If set true ClickHouse will wait for running queries finish before shutdown. skip_binary_checksum_checks {#skip_binary_checksum_checks} Skips ClickHouse binary checksum integrity checks ssh_server {#ssh_server} The public part of the host key will be written to the known_hosts file on the SSH client side on the first connect. Host Key Configurations are inactive by default. Uncomment the host key configurations, and provide the path to the respective ssh key to active them: Example: xml <ssh_server> <host_rsa_key>path_to_the_ssh_key</host_rsa_key> <host_ecdsa_key>path_to_the_ssh_key</host_ecdsa_key> <host_ed25519_key>path_to_the_ssh_key</host_ed25519_key> </ssh_server> startup_mv_delay_ms {#startup_mv_delay_ms} Debug parameter to simulate materizlied view creation delay storage_configuration {#storage_configuration} Allows for multi-disk configuration of storage. Storage configuration follows the structure: xml <storage_configuration> <disks> <!-- configuration --> </disks> <policies> <!-- configuration --> </policies> </storage_configuration> Configuration of disks {#configuration-of-disks} Configuration of disks follows the structure given below: xml <storage_configuration> <disks> <disk_name_1> <path>/mnt/fast_ssd/clickhouse/</path> </disk_name_1> <disk_name_2> <path>/mnt/hdd1/clickhouse/</path> <keep_free_space_bytes>10485760</keep_free_space_bytes> </disk_name_2> <disk_name_3> <path>/mnt/hdd2/clickhouse/</path> <keep_free_space_bytes>10485760</keep_free_space_bytes> </disk_name_3> ... </disks> </storage_configuration> The sub-tags above define the following settings for disks :
{"source_file": "settings.md"}
[ -0.008513089269399643, -0.03369136154651642, -0.09153050184249878, 0.029695790261030197, -0.02660737745463848, -0.03828797861933708, -0.01932663284242153, -0.017158571630716324, -0.0191947091370821, 0.010311144404113293, 0.019226737320423126, 0.005266670603305101, 0.008462664671242237, -0....
629137ef-14b8-4958-9517-15039618aab4
The sub-tags above define the following settings for disks : | Setting | Description | |-------------------------|-------------------------------------------------------------------------------------------------------| | <disk_name_N> | The name of the disk, which should be unique. | | path | The path to which server data will be stored ( data and shadow catalogues). It should end with / | | keep_free_space_bytes | Size of the reserved free space on disk. | :::note The order of the disks does not matter. ::: Configuration of policies {#configuration-of-policies} The sub-tags above define the following settings for policies :
{"source_file": "settings.md"}
[ -0.012340010143816471, -0.003346432000398636, -0.10034044086933136, 0.019644705578684807, -0.0055048344656825066, -0.0520443432033062, -0.020033618435263634, 0.019966421648859978, 0.03846171125769615, 0.06997131556272507, 0.06666643917560577, -0.0007283712038770318, 0.05361778661608696, -0...
f231a0a4-0b66-4b43-bee0-550c79198289
| Setting | Description | |------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | policy_name_N | Name of the policy. Policy names must be unique. | | volume_name_N | The volume name. Volume names must be unique. | | disk | The disk located inside the volume. | | max_data_part_size_bytes
{"source_file": "settings.md"}
[ 0.006647093687206507, 0.0547863245010376, -0.008117456920444965, -0.013869736343622208, -0.060154691338539124, 0.06569989025592804, 0.0158355962485075, 0.04094215855002403, 0.02476569265127182, -0.07007012516260147, 0.02682662568986416, -0.037792593240737915, -0.015694770961999893, -0.0628...
45d46481-b8f2-4647-a187-9f62f8b991ec
| max_data_part_size_bytes | The maximum size of a chunk of data that can reside on any of the disks in this volume. If the merge results in a chunk size expected to be larger than max_data_part_size_bytes, the chunk will be written to the next volume. Basically this feature allows you to store new / small chunks on a hot (SSD) volume and move them to a cold (HDD) volume when they reach a large size. Do not use this option if the policy has only one volume. | | move_factor | The share of available free space on the volume. If the space becomes less, the data will start transferring to the next volume, if there is one. For transfer, chunks are sorted by size from larger to smaller (descending) and chunks whose total size is sufficient to meet the move_factor condition are selected, if the total size of all chunks is insufficient, all chunks will be moved. | | perform_ttl_move_on_insert | Disables moving data with expired TTL on insertion. By default (if enabled), if we insert a piece of data that has already expired according to the move on life rule, it is immediately moved to the volume / disk specified in the move rule. This can significantly slow down insertion in case the target volume / disk is slow (e.g. S3). If disabled, the expired portion of the data is written to the default volume and then immediately moved to the volume specified in the rule for the expired TTL. | | load_balancing | Disk balancing policy, round_robin or least_used . | | least_used_ttl_ms | Sets the timeout (in milliseconds) to update the available space on all disks ( 0 - always update, -1 - never update, default value is 60000 ). Note, if the disk is only used by ClickHouse and will not be subject to file system resizing on the fly, you can use the -1 value. In all other cases this is not recommended, as it will eventually lead to incorrect space allocation. | | prefer_not_to_merge
{"source_file": "settings.md"}
[ -0.06289881467819214, -0.036544155329465866, -0.024136260151863098, -0.0255435761064291, 0.05265427380800247, -0.03702865168452263, -0.05459597706794739, 0.010475452058017254, 0.0186134185642004, 0.019446419551968575, 0.05636876821517944, 0.10037766396999359, 0.035841576755046844, -0.03008...
d55be7b9-ab8b-416d-b767-fbe0eed08b95
| prefer_not_to_merge | Disables merging parts of the data on this volume. Note: this is potentially harmful and can cause slowdown. When this setting is enabled (don't do this), merging data on this volume is prohibited (which is bad). This allows control of how ClickHouse interacts with slow disks. We recommend not to use this at all. | | volume_priority | Defines the priority (order) in which volumes are filled. The smaller the value, the higher the priority. The parameter values must be natural numbers and cover the range from 1 to N (N is the largest parameter value specified) with no gaps. |
{"source_file": "settings.md"}
[ 0.015628162771463394, -0.00421128561720252, -0.009391829371452332, -0.048646874725818634, -0.025336723774671555, -0.07143586874008179, 0.005547661334276199, -0.03584463149309158, -0.008594035170972347, -0.028916029259562492, 0.06778894364833832, 0.027144165709614754, 0.012485424987971783, ...