> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-3a82795f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> 클러스터에서 실행된 분산 DDL 쿼리(ON CLUSTER 절을 사용하는 쿼리) 정보를 담고 있는 시스템 테이블입니다.

# system.distributed_ddl_queue

<div id="description">
  ## 설명
</div>

클러스터에서 실행된 [분산 DDL 쿼리(ON CLUSTER 절)](/ko/reference/statements/distributed-ddl)에 대한 정보를 담고 있습니다.

<div id="columns">
  ## 컬럼
</div>

* `entry` ([String](/ko/reference/data-types)) — 쿼리 ID입니다.
* `entry_version` ([Nullable(UInt8)](/ko/reference/data-types)) — 항목 버전입니다.
* `initiator_host` ([Nullable(String)](/ko/reference/data-types)) — DDL 작업을 시작한 호스트입니다.
* `initiator_port` ([Nullable(UInt16)](/ko/reference/data-types)) — 작업 시작 호스트가 사용한 포트입니다.
* `cluster` ([String](/ko/reference/data-types)) — 클러스터 이름이며, 확인되지 않은 경우 비어 있습니다.
* `query` ([String](/ko/reference/data-types)) — 실행된 쿼리입니다.
* `settings` ([Map(String, String)](/ko/reference/data-types)) — DDL 작업에 사용된 설정입니다.
* `query_create_time` ([DateTime](/ko/reference/data-types)) — 쿼리 생성 시각입니다.
* `host` ([Nullable(String)](/ko/reference/data-types)) — 호스트명입니다.
* `port` ([Nullable(UInt16)](/ko/reference/data-types)) — 호스트 포트입니다.
* `status` ([Nullable(Enum8('Inactive' = 0, 'Active' = 1, 'Finished' = 2, 'Removing' = 3, 'Unknown' = 4))](/ko/reference/data-types)) — 쿼리 상태입니다.
* `exception_code` ([Nullable(UInt16)](/ko/reference/data-types)) — 예외 코드입니다.
* `exception_text` ([Nullable(String)](/ko/reference/data-types)) — 예외 메시지입니다.
* `query_finish_time` ([Nullable(DateTime)](/ko/reference/data-types)) — 쿼리 종료 시각입니다.
* `query_duration_ms` ([Nullable(UInt64)](/ko/reference/data-types)) — 쿼리 실행 시간(밀리초)입니다.

<div id="example">
  ## 예시
</div>

```sql theme={null}
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.
```
