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

> System table that collects the embedded documentation of the uniform components of the system (functions, table engines, data types, and so on) into a single table, with the reference documentation rendered as Markdown.

# system.documentation

<h2 id="description">
  Description
</h2>

Collects the embedded documentation of the uniform components of the system into a single table. Every row corresponds to one entity (a function, a table engine, a data type, and so on) and contains the reference documentation of that entity rendered as Markdown — the same content that is published on the website and exposed by the per-kind `system.*` tables.

The `description` is assembled from the structured parts of the embedded documentation (`description`, `syntax`, arguments, examples, and so on), so a single column holds the complete documentation of an entity. When the embedded documentation carries the entire reference page in its `description` (as is the case for the components whose website pages are autogenerated from it: table engines, database engines, data types, formats, table functions), the page is published as-is, without appending sections composed from the structured metadata fields — the page body already covers that material. Aliases are rendered as a short reference to the canonical entity, e.g. ``Alias of `trunc`.``

This table, in a certain way, collects the information available in the per-kind documentation tables ([`system.functions`](/reference/system-tables/functions), [`system.table_engines`](/reference/system-tables/table_engines), [`system.data_type_families`](/reference/system-tables/data_type_families), and others). It is meant, in particular, to back an interactive `help` command in the client, but is useful on its own.

The following kinds of entities are collected (the value of the `type` column is shown in parentheses):

* Functions (`Function`)
* Aggregate functions (`Aggregate Function`)
* Table functions (`Table Function`)
* Table engines (`Table Engine`)
* Database engines (`Database Engine`)
* Data types (`Data Type`)
* Dictionary layouts (`Dictionary Layout`)
* Dictionary sources (`Dictionary Source`)
* Aggregate function combinators (`Aggregate Function Combinator`)
* Data skipping index types (`Data Skipping Index`)
* Disk types (`Disk Type`)
* Settings (`Setting`)
* MergeTree settings (`MergeTree Setting`)
* Server settings (`Server Setting`)
* Formats (`Format`)
* Compression codecs (`Compression Codec`)
* Profile events (`Profile Event`)
* Current metrics (`Current Metric`)
* Asynchronous metrics (`Asynchronous Metric`)
* System tables (`System Table`)
* SQL statements (`Statement`)

For settings (of any kind), the documentation is the setting's description, together with its type and default value; obsolete settings are not exposed. It also carries the history of the changes of the setting's default value across ClickHouse versions: the version in which the setting was introduced and every later change of its default, with the previous value, the new value and the reason for the change. This is the same data that backs the `compatibility` setting and [`system.settings_changes`](/reference/system-tables/settings_changes), so it covers the changes recorded since that mechanism was introduced: an older setting whose default never changed has no history, and neither do server settings, which `compatibility` does not cover. A change recorded under an alias of a setting belongs to the history of that setting, the same way `compatibility` applies it, so the history of a setting that was renamed is not cut at the rename; the exception is a record written under an alias for the sole purpose of registering that alias, which is the history of the alias alone. An alias carries the history of its own name: every record written under it, plus the record that registered it as an alias, which the history file sometimes writes under another name of the same setting.

For system tables, the documentation is the table comment together with the list of its columns (the name, type and description of each).

For SQL statements, the documentation is rendered from the structured fields exposed by `system.statements`, including syntax and related statements when those sections are not already part of the source-owned description.

The `source` column holds the path of the source file where the entity's documentation is defined, relative to the repository root. For most entities it is captured automatically at the place where the documentation object is constructed (the registration site of the component); for the kinds that are documented in a single source file each (such as settings, profile events and current metrics), it is that file.

<h2 id="columns">
  Columns
</h2>

* `name` ([String](/reference/data-types/string)) — The name of the entity, e.g. `domainWithoutWWW` or `MergeTree`.
* `type` ([Enum8('Function' = 1, 'Aggregate Function' = 2, 'Table Function' = 3, 'Table Engine' = 4, 'Database Engine' = 5, 'Data Type' = 6, 'Dictionary Layout' = 7, 'Dictionary Source' = 8, 'Aggregate Function Combinator' = 9, 'Data Skipping Index' = 10, 'Disk Type' = 11, 'Setting' = 12, 'MergeTree Setting' = 13, 'Server Setting' = 14, 'Format' = 15, 'Compression Codec' = 16, 'Profile Event' = 17, 'Current Metric' = 18, 'Asynchronous Metric' = 19, 'System Table' = 20, 'Statement' = 21)](/reference/data-types/enum)) — The kind of the entity, e.g. `Function` or `Table Engine`.
* `description` ([String](/reference/data-types/string)) — The reference documentation of the entity rendered as Markdown, assembled from the embedded documentation (the same content as published on the website), including syntax, examples and other structured parts, if any.
* `source` ([String](/reference/data-types/string)) — The path to the source file where the entity's documentation is defined, relative to the repository root. Empty if the source location is unknown.

<h2 id="example">
  Example
</h2>

Read the documentation of a particular entity:

```sql title="Query" theme={null}
SELECT description
FROM system.documentation
WHERE type = 'Table Engine' AND name = 'MergeTree'
FORMAT TSVRaw;
```

The same name can refer to several kinds of entities (for example, there is both a `file` table function and a `file` dictionary source), so it is convenient to look a name up across all kinds:

```sql title="Query" theme={null}
SELECT type, name
FROM system.documentation
WHERE name = 'file'
ORDER BY type;
```

Count the documented entities of each kind:

```sql title="Query" theme={null}
SELECT type, count()
FROM system.documentation
GROUP BY type
ORDER BY count() DESC;
```

Find out in which version a setting was introduced and how its default value changed since:

```sql title="Query" theme={null}
SELECT description
FROM system.documentation
WHERE type = 'Setting' AND name = 'async_insert_max_data_size'
FORMAT TSVRaw;
```

<h2 id="see-also">
  See also
</h2>

* [`system.functions`](/reference/system-tables/functions) — Regular and aggregate functions.
* [`system.table_functions`](/reference/system-tables/table_functions) — Table functions.
* [`system.table_engines`](/reference/system-tables/table_engines) — Table engines.
* [`system.database_engines`](/reference/system-tables/database_engines) — Database engines.
* [`system.data_type_families`](/reference/system-tables/data_type_families) — Data types.
* [`system.disk_types`](/reference/system-tables/disk_types) — Disk types.
* [`system.settings`](/reference/system-tables/settings) — Settings.
* [`system.merge_tree_settings`](/reference/system-tables/merge_tree_settings) — MergeTree settings.
* [`system.server_settings`](/reference/system-tables/server_settings) — Server settings.
* [`system.settings_changes`](/reference/system-tables/settings_changes) — The history of the changes of the default values of settings.
* [`system.formats`](/reference/system-tables/formats) — Formats.
