

 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\_MV\_REFRESH\_HISTORY
<a name="SYS_MV_REFRESH_HISTORY"></a>

결과에는 모든 구체화된 뷰의 새로 고침 기록에 대한 정보가 포함됩니다. 결과에는 수동 또는 자동과 같은 새로 고침 유형과 가장 최근의 새로 고침 상태가 포함됩니다.

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

## 테이블 열
<a name="SYS_MV_REFRESH_HISTORY-table-columns"></a>


| 열 이름  | 데이터 유형  | 설명  | 
| --- | --- | --- | 
| user\_id | 정수 | 새로 고침을 제출한 사용자의 식별자입니다. | 
| session\_id | 정수 | 구체화된 뷰 새로 고침을 실행하는 프로세스의 프로세스 식별자입니다. | 
| transaction\_id | bigint | 트랜잭션 식별자입니다. | 
| database\_name | char(128) | 구체화된 보기를 포함하는 데이터베이스입니다. | 
| schema\_name | char(128) | 구체화된 보기의 스키마입니다. | 
| mv\_id | bigint | 구체화된 뷰의 객체 ID입니다. | 
| mv\_name | char(128) | 구체화된 보기 이름입니다. | 
| refresh\_type | char(32) | 새로 고침 유형(예: 수동 또는 자동) | 
| status | 텍스트 | 새로 고침의 상태입니다. 상태에 대한 자세한 내용은 [SVL\_MV\_REFRESH\_STATUS](r_SVL_MV_REFRESH_STATUS.md)의 상태 열을 참조하세요. | 
| start\_time | timestamp | 새로 고침의 시작 시간입니다. | 
| end\_time | timestamp | 새로 고침의 종료 시간입니다. | 
| duration | bigint | 구체화된 뷰를 새로 고치는 데 걸린 시간(마이크로초)입니다. | 
| consumer\_account | char(12) | 새로 고침을 시작한 소비자 클러스터의 AWS 계정 ID입니다. 이 필드는 데이터 공유 설정의 소비자 클러스터에서 새로 고침이 시작될 때 채워집니다. | 
| consumer\_region | char(32) | 새로 고침을 시작한 소비자 클러스터의 AWS 리전입니다. 이 필드는 데이터 공유 설정의 소비자 클러스터에서 새로 고침이 시작될 때 채워집니다. | 
| consumer\_namespace | char(36) | 새로 고침을 시작한 소비자 클러스터의 네임스페이스 식별자입니다. 이 필드는 데이터 공유 설정의 소비자 클러스터에서 새로 고침이 시작될 때 채워집니다. | 

## 샘플 쿼리
<a name="SYS_MV_REFRESH_HISTORY-sample-queries"></a>

다음 쿼리는 구체화된 뷰에 대한 새로 고침 기록을 보여줍니다.

```
SELECT user_id, 
     session_id, 
     transaction_id, 
     database_name, 
     schema_name, 
     mv_id, 
     mv_name,
     refresh_type,
     status,
     start_time,
     end_time,
     duration,
     consumer_account,
     consumer_region,
     consumer_namespace
     from sys_mv_refresh_history;
```

이 쿼리는 다음과 같은 샘플 출력을 반환합니다.

```
 user_id | session_id | transaction_id | database_name | schema_name                | mv_id  |  mv_name           |  refresh_type  |  status                                                                                              |  start_time                |  end_time                  |  duration | consumer_account | consumer_region | consumer_namespace
---------+------------+----------------+---------------+----------------------------+--------+--------------------+----------------+------------------------------------------------------------------------------------------------------+----------------------------+----------------------------+-----------+------------------+-----------------+------------------------------------
       1 | 1073815659 |          15066 | dev           | test_stl_mv_refresh_schema | 203762 | mv_incremental     | Manual         | MV was already updated                                                                               | 2023-10-26 15:59:20.952179 | 2023-10-26 15:59:20.952866 |      687 |                  |                 |
       1 | 1073815659 |          15068 | dev           | test_stl_mv_refresh_schema | 203771 | mv_nonincremental  | Manual         | MV was already updated                                                                               | 2023-10-26 15:59:21.008049 | 2023-10-26 15:59:21.008658 |      609 |                  |                 |
       1 | 1073815659 |          15070 | ext_db        | producer_schema            | 203779 | producer_mv        | Manual         | Refresh successfully updated MV incrementally                                                        | 2023-10-26 15:59:21.064252 | 2023-10-26 15:59:21.064885 |      633 | 0123456789       | us-east-1       | 623d8ff2-4391-4381-83d7-177caa6767af
       1 | 1073815659 |          15074 | dev           | test_stl_mv_refresh_schema | 203762 | mv_incremental     | Manual         | Refresh successfully updated MV incrementally                                                        | 2023-10-26 15:59:29.693329 | 2023-10-26 15:59:43.482842 | 13789513 |                  |                 |
       1 | 1073815659 |          15076 | dev           | test_stl_mv_refresh_schema | 203771 | mv_nonincremental  | Manual         | Refresh successfully recomputed MV from scratch                                                      | 2023-10-26 15:59:43.550184 | 2023-10-26 15:59:47.880833 |  4330649 |                  |                 |
       1 | 1073815659 |          15078 | dev           | test_stl_mv_refresh_schema | 203779 | mv_refresh_error   | Manual         | Refresh failed due to an internal error                                                              | 2023-10-26 15:59:47.949052 | 2023-10-26 15:59:52.494681 |  4545629 |                  |                 |
       1 | 1073815659 |          15071 | dev           | test_stl_mv_refresh_schema | 203778 | mv_test            | Manual         | Cascade refresh failed because materialized view test_stl_mv_refresh_schema.child was not refreshed. | 2023-10-26 15:30:21.432252 | 2023-10-26 15:30:21.432252 |      532 |                  |                 |
       1 | 1073815659 |          15071 | dev           | test_stl_mv_refresh_schema | 203761 | child              | Manual         | Refresh failed due to an internal error.                                                             | 2023-10-26 15:30:21.432252 | 2023-10-26 15:30:21.432252 |      532 |                  |                 |
       1 | 1073815659 |          15069 | dev           | test_stl_mv_refresh_schema | 203778 | mv_test            | Manual         | Cascade refresh skipped because materialized view test_stl_mv_refresh_schema.child was not refreshed.| 2023-10-26 15:21:43.550369 | 2023-10-26 15:21:43.550369 |      633
       1 | 1073815659 |          15069 | dev           | test_stl_mv_refresh_schema | 203761 | child              | Manual         | Refresh failed due to an internal error.                                                             | 2023-10-26 15:21:43.550369 | 2023-10-26 15:21:43.550369 |      633
(10 rows)
```