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

> Dictionaryに関する情報を含むシステムテーブル

# system.dictionaries

<Info>
  **ClickHouse Cloud でのクエリ**

  このシステムテーブルのデータは、ClickHouse Cloud の各ノードにローカルに保持されています。したがって、すべてのデータを完全に把握するには、`clusterAllReplicas` 関数を使用する必要があります。詳細については、[こちら](/ja/reference/system-tables/overview#system-tables-in-clickhouse-cloud)を参照してください。
</Info>

<div id="description">
  ## 説明
</div>

[Dictionary](/ja/reference/statements/create/dictionary) に関する情報が含まれます。

<div id="columns">
  ## カラム
</div>

* `database` ([String](/ja/reference/data-types)) — DDL query によって作成された Dictionary を含むデータベース名。その他の Dictionary では空文字列です。
* `name` ([String](/ja/reference/data-types)) — Dictionary 名。
* `uuid` ([UUID](/ja/reference/data-types)) — Dictionary UUID。
* `status` ([Enum8('NOT\_LOADED' = 0, 'LOADED' = 1, 'FAILED' = 2, 'LOADING' = 3, 'FAILED\_AND\_RELOADING' = 4, 'LOADED\_AND\_RELOADING' = 5, 'NOT\_EXIST' = 6)](/ja/reference/data-types)) — Dictionary の状態。設定可能な値:
  * **NOT\_LOADED** — 使用されていないため、Dictionary は読み込まれていません
  * **LOADED** — Dictionary は正常に読み込まれました
  * **FAILED** — エラーにより Dictionary を読み込めませんでした
  * **LOADING** — Dictionary は現在読み込み中です
  * **LOADED\_AND\_RELOADING** — Dictionary は正常に読み込まれています
  * **and is being reloaded right now (frequent reasons: SYSTEM RELOAD DICTIONARY query** —
  * **timeout** —
  * **dictionary config has changed)** —
  * **FAILED\_AND\_RELOADING** — エラーにより Dictionary を読み込めず、現在読み込み中です。
* `origin` ([String](/ja/reference/data-types)) — Dictionary を記述した設定ファイルへのパス。
* `type` ([String](/ja/reference/data-types)) — Dictionary の割り当てタイプ。Dictionaries のメモリ内での保存方法です。
* `key.names` ([Array(String)](/ja/reference/data-types)) — Dictionary が提供する key 名の Array。
* `key.types` ([Array(String)](/ja/reference/data-types)) — Dictionary が提供する、対応する key type の Array。
* `attribute.names` ([Array(String)](/ja/reference/data-types)) — Dictionary が提供する attribute 名の Array。
* `attribute.types` ([Array(String)](/ja/reference/data-types)) — Dictionary が提供する、対応する attribute type の Array。
* `bytes_allocated` ([UInt64](/ja/reference/data-types)) — Dictionary に割り当てられた RAM の量。
* `hierarchical_index_bytes_allocated` ([UInt64](/ja/reference/data-types)) — 階層索引に割り当てられた RAM の量。
* `query_count` ([UInt64](/ja/reference/data-types)) — Dictionary の読み込み後、または前回正常に再起動して以降のクエリ数。
* `hit_rate` ([Float64](/ja/reference/data-types)) — cache Dictionary で、値が cache 内に存在した使用の割合。
* `found_rate` ([Float64](/ja/reference/data-types)) — 値が見つかった使用の割合。
* `element_count` ([UInt64](/ja/reference/data-types)) — Dictionary に格納されている項目数。
* `load_factor` ([Float64](/ja/reference/data-types)) — Dictionary の充填率 (ハッシュ Dictionary の場合は、hash table の充填率) 。
* `source` ([String](/ja/reference/data-types)) — Dictionary の data source を説明するテキスト。
* `lifetime_min` ([UInt64](/ja/reference/data-types)) — メモリ内の Dictionary の最小有効期間。この期間を過ぎると、ClickHouse は Dictionary の再読み込みを試みます (`invalidate_query` が設定されている場合は、変更があったときのみ) 。Seconds 単位で設定します。
* `lifetime_max` ([UInt64](/ja/reference/data-types)) — メモリ内の Dictionary の最大有効期間。この期間を過ぎると、ClickHouse は Dictionary の再読み込みを試みます (`invalidate_query` が設定されている場合は、変更があったときのみ) 。Seconds 単位で設定します。
* `loading_start_time` ([DateTime](/ja/reference/data-types)) — Dictionary の読み込み開始時刻。
* `last_successful_update_time` ([DateTime](/ja/reference/data-types)) — Dictionary の読み込みまたは更新の終了時刻。Dictionary ソースに関する問題の監視や、原因の調査に役立ちます。
* `error_count` ([UInt64](/ja/reference/data-types)) — 前回正常に読み込まれて以降のエラー数。Dictionary ソースに関する問題の監視や、原因の調査に役立ちます。
* `loading_duration` ([Float32](/ja/reference/data-types)) — Dictionary の読み込み時間。
* `last_exception` ([String](/ja/reference/data-types)) — Dictionary を作成できなかった場合に、Dictionary の作成または再読み込み時に発生したエラーのテキスト。
* `comment` ([String](/ja/reference/data-types)) — Dictionary に対するコメントのテキスト。

<div id="example">
  ## 例
</div>

Dictionary を設定します。

```sql theme={null}
CREATE DICTIONARY dictionary_with_comment
(
    id UInt64,
    value String
)
PRIMARY KEY id
SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() TABLE 'source_table'))
LAYOUT(FLAT())
LIFETIME(MIN 0 MAX 1000)
COMMENT 'The temporary dictionary';
```

Dictionary が読み込まれていることを確認してください。

```sql theme={null}
SELECT * FROM system.dictionaries LIMIT 1 FORMAT Vertical;
```

```text theme={null}
Row 1:
──────
database:                    default
name:                        dictionary_with_comment
uuid:                        4654d460-0d03-433a-8654-d4600d03d33a
status:                      NOT_LOADED
origin:                      4654d460-0d03-433a-8654-d4600d03d33a
type:
key.names:                   ['id']
key.types:                   ['UInt64']
attribute.names:             ['value']
attribute.types:             ['String']
bytes_allocated:             0
query_count:                 0
hit_rate:                    0
found_rate:                  0
element_count:               0
load_factor:                 0
source:
lifetime_min:                0
lifetime_max:                0
loading_start_time:          1970-01-01 00:00:00
last_successful_update_time: 1970-01-01 00:00:00
loading_duration:            0
last_exception:
comment:                     The temporary dictionary
```
