説明
クラスターで実行された分散 DDL クエリ (ON CLUSTER 句) に関する情報が含まれています。
カラム
entry(String) — クエリID。entry_version(Nullable(UInt8)) — エントリのバージョン。initiator_host(Nullable(String)) — DDL操作を開始したホスト。initiator_port(Nullable(UInt16)) — イニシエーターが使用したポート。cluster(String) — クラスター名。判別できない場合は空です。query(String) — 実行されたクエリ。settings(Map(String, String)) — DDL操作で使用された設定。query_create_time(DateTime) — クエリ作成時刻。host(Nullable(String)) — ホスト名。port(Nullable(UInt16)) — ホストのポート。status(Nullable(Enum8('Inactive' = 0, 'Active' = 1, 'Finished' = 2, 'Removing' = 3, 'Unknown' = 4))) — クエリのステータス。exception_code(Nullable(UInt16)) — 例外コード。exception_text(Nullable(String)) — 例外メッセージ。query_finish_time(Nullable(DateTime)) — クエリ終了時刻。query_duration_ms(Nullable(UInt64)) — クエリ実行時間 (ミリ秒) 。
例
SELECT *
FROM system.distributed_ddl_queue
WHERE cluster = 'test_cluster'
LIMIT 2
FORMAT Vertical
Query id: f544e72a-6641-43f1-836b-24baa1c9632a
Row 1:
──────
entry: query-0000000000
entry_version: 5
initiator_host: clickhouse01
initiator_port: 9000
cluster: test_cluster
query: CREATE DATABASE test_db UUID '4a82697e-c85e-4e5b-a01e-a36f2a758456' ON CLUSTER test_cluster
settings: {'max_threads':'16','use_uncompressed_cache':'0'}
query_create_time: 2023-09-01 16:15:14
host: clickhouse-01
port: 9000
status: Finished
exception_code: 0
exception_text:
query_finish_time: 2023-09-01 16:15:14
query_duration_ms: 154
Row 2:
──────
entry: query-0000000001
entry_version: 5
initiator_host: clickhouse01
initiator_port: 9000
cluster: test_cluster
query: CREATE DATABASE test_db UUID '4a82697e-c85e-4e5b-a01e-a36f2a758456' ON CLUSTER test_cluster
settings: {'max_threads':'16','use_uncompressed_cache':'0'}
query_create_time: 2023-09-01 16:15:14
host: clickhouse-01
port: 9000
status: Finished
exception_code: 630
exception_text: Code: 630. DB::Exception: Cannot drop or rename test_db, because some tables depend on it:
query_finish_time: 2023-09-01 16:15:14
query_duration_ms: 154
2 rows in set. Elapsed: 0.025 sec.