Skip to main content

estimateCompressionRatio

Introduced in: v25.4.0 Estimates the compression ratio of a given column without compressing it.
For the examples below, the result will differ based on the default compression codec of the server. See Column Compression Codecs.
Syntax
Parameters
  • codec — String containing a compression codec or multiple comma-separated codecs in a single string. String
  • block_size_bytes — Block size of compressed data. This is similar to setting both max_compress_block_size and min_compress_block_size. The default value is 1 MiB (1048576 bytes). Maximum allowed value is 256 MiB (268435456 bytes). UInt64
Arguments
  • column — Column of any type. Any
Returned value Returns an estimate compression ratio for the given column. Float64 Examples Basic usage with default codec
Query
Response
Using a specific codec
Query
Response
Using multiple codecs
Query
Response
Last modified on July 2, 2026