メインコンテンツへスキップ
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) — data part が属するデータベース名。
  • table (String) — データパートが属するテーブルの名前。
  • table_uuid (UUID) — そのデータパートが属するテーブルの UUID。
  • part_name (String) — データパート名。
  • partition_id (String) — データパートが挿入された先のパーティションの ID です。パーティション化に tuple() が使用されている場合、このカラムは all の値を取ります。
  • partition (String) — パーティションの名前。
  • part_type (String) — パーツの種類。設定可能な値: wide パーツ、compact パーツ。
  • part_storage_type (String) — DataPartStorage の種類。設定可能な値: Packed - すべてのファイルが 1 つのブロブに保存されます。Full - 各ファイルがそれぞれ 1 つのブロブに保存されます。
  • disk_name (String) — データパートが格納されているディスク名。
  • path_on_disk (String) — データパートのファイルが格納されているフォルダーへの絶対パス。
  • rows (UInt64) — データパート内の行数。
  • size_in_bytes (UInt64) — ディスク上のデータ part のサイズ (バイト単位) 。
  • merged_from (Array(String)) — 現在のパーツの元になったソースパーツ名の配列。
  • bytes_uncompressed (UInt64) — 生成されたパートの非圧縮サイズ (バイト単位) 。
  • read_rows (UInt64) — マージ中に読み取られた行数。
  • read_bytes (UInt64) — マージ中に読み込まれたバイト数。
  • peak_memory_usage (UInt64) — merge 中に使用された RAM の最大使用量
  • deduplication_block_ids (Array(String)) — このパートの挿入時に重複排除で使用される block ID の配列。
  • error (UInt16) — 発生した例外のエラーコードです。
  • exception (String) — 発生したエラーのメッセージ。
  • mutation_ids (Array(String)) — 型が MUTATE_PART_START および MUTATE_PART のイベントで、ソースパート (merged_from) に適用された mutation ID の配列。
  • ProfileEvents (Map(LowCardinality(String), UInt64)) — この操作で収集されたすべてのプロファイルイベント。
  • 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 -- 329万
size_in_bytes:           438968542 -- 4億3897万
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 -- 13億7000万
read_rows:               3285726 -- 329万
read_bytes:              1429206946 -- 14億3000万
peak_memory_usage:       303611887 -- 3億361万
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}
最終更新日 2026年6月10日