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

# direct Dictionary レイアウト

> キャッシュを使用せずにソースを直接参照する Dictionary レイアウト。

## direct

このDictionaryはメモリには保存されず、リクエストの処理時に直接ソースへアクセスします。

Dictionaryキーの型は [UInt64](/ja/reference/data-types/int-uint) です。

選択的に動作するのはルックアップのみです。`dictGet` やその他のDictionary関数は、要求されたキーについてソースへクエリを実行しますが、Dictionaryを**テーブルとして**読み取る場合はキー指定のfetchにはなりません。`SELECT ... FROM <dictionary> WHERE key IN (...)` はソース全体を読み取り、その後に結果をフィルタリングします。キーのフィルターがDictionaryへプッシュダウンされないためです。特定のキーについてソースへクエリを実行したい場合は、Dictionary関数を使用してください。

ローカルファイルを除く、すべての種類の[sources](/ja/reference/statements/create/dictionary/sources/overview#dictionary-sources) がサポートされています。

設定例:

<Tabs>
  <Tab title="DDL">
    ```sql theme={null}
    LAYOUT(DIRECT())
    ```
  </Tab>

  <Tab title="設定ファイル">
    ```xml theme={null}
    <layout>
      <direct />
    </layout>
    ```
  </Tab>
</Tabs>

<br />

## complex\_key\_direct

このタイプのストレージは、複合[キー](/ja/reference/statements/create/dictionary/attributes#composite-key)での使用を目的としています。`direct`に似ています。
