

 Amazon Redshift는 패치 198부터 새 Python UDF 생성을 더 이상 지원하지 않습니다. 기존 Python UDF는 2026년 6월 30일까지 계속 작동합니다. 자세한 내용은 [블로그 게시물](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)을 참조하세요.

# SYS\_ANALYZE\_COMPRESSION\_HISTORY
<a name="r_SYS_ANALYZE_COMPRESSION_HISTORY"></a>

COPY 또는 ANALYZE COMPRESSION 명령을 수행하는 동안 압축 분석 작업에 대한 세부 정보를 기록합니다.

SYS\_ANALYZE\_COMPRESSION\_HISTORY는 모든 사용자에게 표시됩니다. 수퍼유저는 모든 행을 볼 수 있지만 일반 사용자는 자체 데이터만 볼 수 있습니다. 자세한 내용은 [시스템 테이블 및 뷰에 있는 데이터의 가시성](cm_chap_system-tables.md#c_visibility-of-data) 섹션을 참조하세요.

## 테이블 열
<a name="r_SYS_ANALYZE_COMPRESSION_HISTORY-table-columns2"></a>


| 열 이름  | 데이터 유형  | 설명  | 
| --- | --- | --- | 
| user\_id | 정수 | 항목을 생성한 사용자의 ID입니다. | 
| start\_time | timestamp | 압축 분석 작업을 시작한 시간입니다. | 
| transaction\_id | bigint | 압축 분석 작업의 트랜잭션 ID입니다. | 
| table\_id | 정수 | 분석한 테이블의 테이블 ID입니다. | 
| table\_name | character(128) | 분석한 테이블의 이름입니다. | 
| column\_position | 정수 | 압축 인코딩을 확인하기 위해 분석한 테이블의 열 인덱스입니다. | 
| old\_encoding | character(15) | 압축 분석 이전의 인코딩 유형입니다. | 
| new\_encoding | character(15) | 압축 분석 이후의 인코딩 유형입니다. | 
| 모드 | character(14) | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ko_kr/redshift/latest/dg/r_SYS_ANALYZE_COMPRESSION_HISTORY.html)  | 

## 샘플 쿼리
<a name="r_SYS_ANALYZE_COMPRESSION_HISTORY-sample-queries2"></a>

다음 예에서는 동일한 세션에서 실행된 마지막 COPY 명령으로 `lineitem` 테이블에 대한 압축 분석의 세부 정보를 검사합니다.

```
select transaction_id, table_id, btrim(table_name) as table_name, column_position, old_encoding, new_encoding, mode 
from sys_analyze_compression_history
where transaction_id = (select transaction_id from sys_query_history where query_id = pg_last_copy_id()) order by column_position;
                
 transaction_id  |  table_id   | table_name | column_position |  old_encoding   |  new_encoding   |      mode
-----------------+-------------+------------+-----------------+-----------------+-----------------+-------------
      8196       |   248126    | lineitem   |        0        | mostly32        | mostly32        | ON
      8196       |   248126    | lineitem   |        1        | mostly32        | lzo             | ON
      8196       |   248126    | lineitem   |        2        | lzo             | delta32k        | ON
      8196       |   248126    | lineitem   |        3        | delta           | delta           | ON
      8196       |   248126    | lineitem   |        4        | bytedict        | bytedict        | ON
      8196       |   248126    | lineitem   |        5        | mostly32        | mostly32        | ON
      8196       |   248126    | lineitem   |        6        | delta           | delta           | ON
      8196       |   248126    | lineitem   |        7        | delta           | delta           | ON
      8196       |   248126    | lineitem   |        8        | lzo             | zstd            | ON
      8196       |   248126    | lineitem   |        9        | runlength       | zstd            | ON
      8196       |   248126    | lineitem   |       10        | delta           | lzo             | ON
      8196       |   248126    | lineitem   |       11        | delta           | delta           | ON
      8196       |   248126    | lineitem   |       12        | delta           | delta           | ON
      8196       |   248126    | lineitem   |       13        | bytedict        | zstd            | ON
      8196       |   248126    | lineitem   |       14        | bytedict        | zstd            | ON
      8196       |   248126    | lineitem   |       15        | text255         | zstd            | ON
(16 rows)
```