Skip to main content
These settings are available in system.merge_tree_settings and are autogenerated from ClickHouse source.

map_buckets_coefficient

The coefficient used in sqrt and linear map_buckets_strategy to calculate the number of buckets from the average map size. For sqrt strategy: round(map_buckets_coefficient * sqrt(avg_map_size)). For linear strategy: round(map_buckets_coefficient * avg_map_size). Ignored when map_buckets_strategy is constant.

map_buckets_min_avg_size

The minimum average map size (number of keys per row) required to apply with_buckets serialization. If the average map size is less than this value, a single bucket is used regardless of other bucket settings. A value of 0 disables the threshold and always applies the bucketing strategy. This setting is useful to avoid the overhead of bucketed serialization for small maps where the benefit is negligible.

map_buckets_strategy

Controls the strategy for choosing the number of buckets in with_buckets Map serialization based on the average map size. Possible values:
  • constant — Always use max_buckets_in_map as the number of buckets, regardless of the average map size.
  • sqrt — Use round(map_buckets_coefficient * sqrt(avg_map_size)) as the number of buckets, clamped to [1, max_buckets_in_map].
  • linear — Use round(map_buckets_coefficient * avg_map_size) as the number of buckets, clamped to [1, max_buckets_in_map].
Last modified on July 23, 2026