These settings are available in system.settings and are autogenerated from source.
shrink_over_allocated_columns_min_waste_bytes
Version history
| Version | Default value | Comment |
|---|---|---|
| 26.8 | 16777216 | New setting: minimum absolute wasted memory in a column for it to be shrunk to fit on INSERT. |
Minimum absolute amount of wasted (reserved but unused) memory in a column, in bytes, for it to be shrunk to fit on INSERT. See shrink_over_allocated_columns_min_waste_ratio.
Prevents reallocating columns whose over-allocation is small, where the memory saving would not justify the cost.
shrink_over_allocated_columns_min_waste_ratio
Version history
| Version | Default value | Comment |
|---|---|---|
| 26.8 | 1 | New setting to shrink over-allocated columns to fit on INSERT to reduce peak memory usage. Disabled by default (1.0). |
On INSERT, over-allocated columns (whose reserved memory exceeds the used memory, e.g. due to power-of-two growth of variable-length columns) are shrunk to fit before the expensive materialization and part-writing stages, to reduce peak memory usage.
A column is shrunk only when allocatedBytes() > byteSize() * shrink_over_allocated_columns_min_waste_ratio and the absolute waste is at least shrink_over_allocated_columns_min_waste_bytes.
Possible values:
- Float greater than 1.
- Value less than or equal to 1 disables the shrinking (the default
1.0keeps it disabled).