[Yandex Cloud documentation](../../index.md) > [Yandex Managed Service for ClickHouse®](../index.md) > [Concepts](index.md) > Dictionaries

# ClickHouse® dictionaries

_Dictionaries_ in ClickHouse® are mappings of key-value pairs that are fully or partially stored in the ClickHouse® server memory.
To access dictionary data, you need to use [dedicated functions](https://clickhouse.com/docs/enen/sql-reference/functions), which run faster than standard SQL queries. You can only read data in dictionaries. ClickHouse® does not support data writes to a dictionary. 

The main advantage of dictionaries is that you can get results faster compared to `JOIN` operations. Opt for dictionaries if you frequently query references to get values by a key.

As their data sources, dictionaries can use [ClickHouse® internal dictionaries](https://clickhouse.com/docs/enen/sql-reference/statements/create/dictionary/embedded) or [external sources](https://clickhouse.com/docs/enen/sql-reference/statements/create/dictionary): an HTTP(s) resource or any other DBMS, such as MySQL®, ClickHouse®, Yandex StoreDoc, and PostgreSQL.


## Internal dictionaries {#internal-dicts}

Managed Service for ClickHouse® contains an embedded geobase dictionary and functions to work with it. With this dictionary, you can:

* Get the name of a region in the required language by the region ID.
* Get the ID of a city, district, state/province, country, and continent by the region ID.
* Check whether one region is part of another.
* Get a chain of parent regions.

For more about the functions for working with internal dictionaries, see [this ClickHouse® guide](https://clickhouse.com/docs/enen/sql-reference/functions/ym-dict-functions).

If the built-in geobase does not fit your purpose, you can add a [custom geobase](../operations/geobase.md) to ClickHouse®.


## External dictionaries {#external-dicts}

External dictionaries can use HTTP(s) resources and other DBMS's, such as MySQL®, ClickHouse®, Yandex StoreDoc, and PostgreSQL, as data sources.

Depending on the dictionary settings, ClickHouse® fully or partially stores dictionaries in RAM, updates them on a regular basis, and dynamically loads the missing values.

To learn how to connect and configure a dictionary using Yandex Managed Service for ClickHouse®, see [Connecting external dictionaries](../operations/dictionaries.md).

## Use cases {#examples}

* [Connecting external dictionaries in Managed Service for ClickHouse®](../operations/dictionaries.md)

_ClickHouse® is a registered trademark of [ClickHouse, Inc](https://clickhouse.com)._