mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
5d6a2609c8
* Updated doc of distributed_ddl_queue * Update docs/en/operations/system-tables/distributed_ddl_queue.md Co-authored-by: Alexander Tokmakov <tavplubix@gmail.com> * Update docs/en/operations/system-tables/distributed_ddl_queue.md Co-authored-by: Alexander Tokmakov <tavplubix@gmail.com> * Update docs/en/operations/system-tables/distributed_ddl_queue.md Co-authored-by: Alexander Tokmakov <tavplubix@gmail.com> --------- Co-authored-by: Alexander Tokmakov <tavplubix@gmail.com>
3.1 KiB
3.1 KiB
slug |
---|
/en/operations/system-tables/distributed_ddl_queue |
distributed_ddl_queue
Contains information about distributed ddl queries (ON CLUSTER clause) that were executed on a cluster.
Columns:
entry
(String) — Query id.entry_version
(Nullable(UInt8)) - Version of the entryinitiator_host
(Nullable(String)) - Host that initiated the DDL operationinitiator_port
(Nullable(UInt16)) - Port used by the initiatorcluster
(String) — Cluster name.query
(String) — Query executed.settings
(Map(String, String)) - Settings used in the DDL operationquery_create_time
(DateTime) — Query created time.host
(String) — Hostnameport
(UInt16) — Host Port.status
(Enum8) — Status of the query.exception_code
(Enum8) — Exception code.exception_text
(Nullable(String)) - Exception messagequery_finish_time
(DateTime) — Query finish time.query_duration_ms
(UInt64) — Duration of query execution (in milliseconds).
Example
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.