본문으로 바로가기
본문으로 바로가기

system.part_log

ClickHouse Cloud에서 쿼리하기

이 시스템 테이블의 데이터는 ClickHouse Cloud의 각 노드에 로컬로 저장됩니다. 따라서 전체 데이터를 조회하려면 clusterAllReplicas 함수를 사용해야 합니다. 자세한 내용은 여기를 참고하십시오.

설명

system.part_log 테이블은 part_log 서버 설정이 지정된 경우에만 생성됩니다.

이 테이블에는 MergeTree 계열 테이블의 데이터 파트에 대해 발생한 이벤트(데이터 추가, 병합 등)에 대한 정보가 포함됩니다.

system.part_log 테이블에는 다음 컬럼이 포함됩니다:

컬럼

  • hostname (LowCardinality(String)) — 쿼리를 실행 중인 서버의 호스트명.
  • query_id (String) — 이 데이터 파트를 생성한 INSERT 쿼리의 식별자입니다.
  • event_type (Enum8('NewPart' = 1, 'MergeParts' = 2, 'DownloadPart' = 3, 'RemovePart' = 4, 'MutatePart' = 5, 'MovePart' = 6, 'MergePartsStart' = 7, 'MutatePartStart' = 8)) — 데이터 파트에 대해 발생한 이벤트의 유형입니다. 다음 값 중 하나를 가질 수 있습니다: NewPart — 새 데이터 파트 삽입, MergePartsStart — 데이터 파트 병합이 시작됨, MergeParts — 데이터 파트 병합이 완료됨, DownloadPart — 데이터 파트 다운로드, RemovePart — 데이터 파트를 제거하거나 DETACH PARTITION을 사용해 분리함, MutatePartStart — 데이터 파트 뮤테이션이 시작됨, MutatePart — 데이터 파트 뮤테이션이 완료됨, MovePart — 데이터 파트를 한 디스크에서 다른 디스크로 이동함.
  • merge_reason (Enum8('NotAMerge' = 1, 'RegularMerge' = 2, 'TTLDeleteMerge' = 3, 'TTLRecompressMerge' = 4, 'TTLDropMerge' = 5)) — 유형이 MERGE_PARTS인 이벤트의 발생 이유를 나타냅니다. 다음 값 중 하나를 가질 수 있습니다: NotAMerge — 현재 이벤트의 유형이 MERGE_PARTS가 아닙니다, RegularMerge — 일반 병합, TTLDeleteMerge, TTLDropMerge — 만료된 데이터를 정리합니다. TTLRecompressMerge — 데이터 파트를 재압축합니다.
  • merge_algorithm (Enum8('Undecided' = 0, 'Vertical' = 1, 'Horizontal' = 2)) — 유형이 MERGE_PARTS인 이벤트의 병합 알고리즘입니다. 다음 값 중 하나를 가질 수 있습니다: Undecided, Horizontal, Vertical
  • event_date (Date) — 이벤트 날짜.
  • event_time (DateTime) — 이벤트 발생 시간.
  • event_time_microseconds (DateTime64(6)) — 마이크로초 단위 정밀도를 지원하는 이벤트 시간입니다.
  • duration_ms (UInt64) — 이 작업의 총 소요 시간입니다.
  • database (String) — 데이터 파트가 있는 데이터베이스 이름입니다.
  • table (String) — 데이터 파트가 포함된 테이블의 이름입니다.
  • table_uuid (UUID) — 데이터 파트가 속해 있는 테이블의 UUID입니다.
  • part_name (String) — 데이터 파트 이름입니다.
  • partition_id (String) — 데이터 파트가 삽입된 파티션의 ID입니다. 파티셔닝 기준이 tuple()인 경우 이 컬럼의 값은 all입니다.
  • partition (String) — 파티션 이름입니다.
  • part_type (String) — part의 유형입니다. 가능한 값은 Wide와 Compact입니다.
  • part_storage_type (String) — DataPartStorage의 유형입니다. 가능한 값: Packed - 모든 파일이 단일 blob에 저장됩니다. Full - 각 파일이 별도의 blob에 저장됩니다.
  • disk_name (String) — 데이터 파트가 저장된 디스크의 이름입니다.
  • path_on_disk (String) — 데이터 파트 파일이 저장된 폴더의 절대 경로입니다.
  • rows (UInt64) — 데이터 파트의 행 수입니다.
  • size_in_bytes (UInt64) — 디스크에 저장된 데이터 파트의 크기(바이트)입니다.
  • merged_from (Array(String)) — 현재 파트가 만들어진 원본 파트 이름의 배열입니다.
  • bytes_uncompressed (UInt64) — 결과로 생성된 part의 비압축 크기(바이트)입니다.
  • read_rows (UInt64) — 병합 중에 읽힌 행 수입니다.
  • read_bytes (UInt64) — 병합 중 읽은 바이트 수입니다.
  • peak_memory_usage (UInt64) — 병합 중 사용된 RAM의 최대 사용량
  • deduplication_block_ids (Array(String)) — 이 데이터 part를 삽입할 때 중복 제거에 사용되는 block ID의 배열입니다.
  • error (UInt16) — 발생한 예외의 오류 코드입니다.
  • exception (String) — 발생한 오류의 메시지 텍스트입니다.
  • mutation_ids (Array(String)) — 유형이 MUTATE_PART_START 및 MUTATE_PART인 이벤트에서 소스 파트(merged_from)에 적용된 mutation ID 배열입니다.
  • ProfileEvents (Map(LowCardinality(String), UInt64)) — 이 작업 중에 수집된 모든 profile events입니다.
  • projections_duration_ms (Map(LowCardinality(String), UInt64)) — 프로젝션별 병합/재구축에 걸린 시간(밀리초)입니다.

별칭:

  • ProfileEvents.NamesmapKeys(ProfileEvents)의 별칭입니다.
  • ProfileEvents.ValuesmapValues(ProfileEvents)의 별칭입니다.
  • namepart_name의 별칭입니다.

system.part_log 테이블은 MergeTree 테이블에 처음으로 데이터를 삽입한 후에 생성됩니다.

예시

SELECT * FROM system.part_log LIMIT 1 FORMAT Vertical;
Row 1:
──────
hostname:                clickhouse.eu-central1.internal
query_id:
event_type:              MergeParts
merge_reason:            RegularMerge
merge_algorithm:         Vertical
event_date:              2025-07-19
event_time:              2025-07-19 23:54:19
event_time_microseconds: 2025-07-19 23:54:19.710761
duration_ms:             2158
database:                default
table:                   github_events
table_uuid:              1ad33424-f5f5-402b-ac03-ec82282634ab
part_name:               all_1_7_1
partition_id:            all
partition:               tuple()
part_type:               Wide
disk_name:               default
path_on_disk:            ./data/store/1ad/1ad33424-f5f5-402b-ac03-ec82282634ab/all_1_7_1/
rows:                    3285726 -- 3.29 million
size_in_bytes:           438968542 -- 438.97 million
merged_from:             ['all_1_1_0','all_2_2_0','all_3_3_0','all_4_4_0','all_5_5_0','all_6_6_0','all_7_7_0']
bytes_uncompressed:      1373137767 -- 1.37 billion
read_rows:               3285726 -- 3.29 million
read_bytes:              1429206946 -- 1.43 billion
peak_memory_usage:       303611887 -- 303.61 million
error:                   0
exception:
mutation_ids:
ProfileEvents:           {'FileOpen':703,'ReadBufferFromFileDescriptorRead':3824,'ReadBufferFromFileDescriptorReadBytes':439601681,'WriteBufferFromFileDescriptorWrite':592,'WriteBufferFromFileDescriptorWriteBytes':438988500,'ReadCompressedBytes':439601681,'CompressedReadBufferBlocks':6314,'CompressedReadBufferBytes':1539835748,'OpenedFileCacheHits':50,'OpenedFileCacheMisses':484,'OpenedFileCacheMicroseconds':222,'IOBufferAllocs':1914,'IOBufferAllocBytes':319810140,'ArenaAllocChunks':8,'ArenaAllocBytes':131072,'MarkCacheMisses':7,'CreatedReadBufferOrdinary':534,'DiskReadElapsedMicroseconds':139058,'DiskWriteElapsedMicroseconds':51639,'AnalyzePatchRangesMicroseconds':28,'ExternalProcessingFilesTotal':1,'RowsReadByMainReader':170857759,'WaitMarksLoadMicroseconds':988,'LoadedMarksFiles':7,'LoadedMarksCount':14,'LoadedMarksMemoryBytes':728,'Merge':2,'MergeSourceParts':14,'MergedRows':3285733,'MergedColumns':4,'GatheredColumns':51,'MergedUncompressedBytes':1429207058,'MergeTotalMilliseconds':2158,'MergeExecuteMilliseconds':2155,'MergeHorizontalStageTotalMilliseconds':145,'MergeHorizontalStageExecuteMilliseconds':145,'MergeVerticalStageTotalMilliseconds':2008,'MergeVerticalStageExecuteMilliseconds':2006,'MergeProjectionStageTotalMilliseconds':5,'MergeProjectionStageExecuteMilliseconds':4,'MergingSortedMilliseconds':7,'GatheringColumnMilliseconds':56,'ContextLock':2091,'PartsLockHoldMicroseconds':77,'PartsLockWaitMicroseconds':1,'RealTimeMicroseconds':2157475,'CannotWriteToWriteBufferDiscard':36,'LogTrace':6,'LogDebug':59,'LoggerElapsedNanoseconds':514040,'ConcurrencyControlSlotsGranted':53,'ConcurrencyControlSlotsAcquired':53}