> ## 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 layout

> A dictionary layout that queries the source directly without caching.

<h2 id="direct">
  direct
</h2>

The dictionary is not stored in memory and directly goes to the source during the processing of a request.

The dictionary key has the [UInt64](/reference/data-types/int-uint) type.

Only a lookup is selective. `dictGet` and the other dictionary functions query the source for the requested keys, but reading the dictionary **as a table** is not a keyed fetch: `SELECT ... FROM <dictionary> WHERE key IN (...)` reads the whole source and filters the result afterwards, because the key filter is not pushed down into the dictionary. Use the dictionary functions when you want the source to be queried for particular keys.

All types of [sources](/reference/statements/create/dictionary/sources/overview#dictionary-sources), except local files, are supported.

Configuration example:

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

  <Tab title="Configuration file">
    ```xml theme={null}
    <layout>
      <direct />
    </layout>
    ```
  </Tab>
</Tabs>

<br />

<h2 id="complex_key_direct">
  complex\_key\_direct
</h2>

This type of storage is for use with composite [keys](/reference/statements/create/dictionary/attributes#composite-key). Similar to `direct`.
