> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8a08bda2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> 지정된 컬럼을 실제로 압축하지 않고 압축률을 추정합니다.

# estimateCompressionRatio

<div id="estimateCompressionRatio">
  ## estimateCompressionRatio
</div>

추가된 버전: v25.4.0

지정된 컬럼의 압축률을 실제로 압축하지 않고 추정합니다.

<Note>
  아래 예시의 결과는 서버의 기본 압축 코덱에 따라 달라집니다.
  [컬럼 압축 코덱](/ko/reference/statements/create/table#column_compression_codec)을 참조하십시오.
</Note>

**구문**

```sql theme={null}
estimateCompressionRatio([codec, block_size_bytes])(column)
```

**매개변수**

* `codec` — 압축 코덱 하나 또는 쉼표로 구분된 여러 코덱이 포함된 `String`입니다. [`String`](/ko/reference/data-types/string)
* `block_size_bytes` — 압축 데이터의 블록 크기입니다. 이는 [`max_compress_block_size`](/ko/reference/settings/merge-tree-settings#max_compress_block_size)와 [`min_compress_block_size`](/ko/reference/settings/merge-tree-settings#min_compress_block_size)를 함께 설정하는 것과 유사합니다. 기본값은 1 MiB(1048576바이트)입니다. 허용되는 최대값은 256 MiB(268435456바이트)입니다. [`UInt64`](/ko/reference/data-types/int-uint)

**인수**

* `column` — 임의 타입의 컬럼입니다. [`Any`](/ko/reference/data-types)

**반환 값**

지정된 컬럼의 예상 압축률을 반환합니다. [`Float64`](/ko/reference/data-types/float)

**예시**

**기본 코덱을 사용하는 기본 사용법**

```sql title=Query theme={null}
CREATE TABLE compression_estimate_example
(
    `number` UInt64
)
ENGINE = MergeTree()
ORDER BY number
SETTINGS min_bytes_for_wide_part = 0;

INSERT INTO compression_estimate_example
SELECT number FROM system.numbers LIMIT 100_000;

SELECT estimateCompressionRatio(number) AS estimate FROM compression_estimate_example
```

```response title=Response theme={null}
┌───────────estimate─┐
│ 1.9988506608699999 │
└────────────────────┘
```

**특정 코덱 사용하기**

```sql title=Query theme={null}
SELECT estimateCompressionRatio('T64')(number) AS estimate FROM compression_estimate_example
```

```response title=Response theme={null}
┌──────────estimate─┐
│ 3.762758101688538 │
└───────────────────┘
```

**여러 코덱 사용하기**

```sql title=Query theme={null}
SELECT estimateCompressionRatio('T64, ZSTD')(number) AS estimate FROM compression_estimate_example
```

```response title=Response theme={null}
┌───────────estimate─┐
│ 143.60078980434392 │
└────────────────────┘
```
