ClickHouse/clickhouse-docs-embeddings huggingface dataset:
title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/background_schedule_pool.md)

Querying in ClickHouse Cloud

The data in this system table is held locally on each node in ClickHouse Cloud. Obtaining a complete view of all data, therefore, requires the `clusterAllReplicas` function. See [here](/docs/operations/system-tables/overview#system-tables-in-clickhouse-cloud) for further details.

Contains information about tasks in background schedule pools. Background schedule pools are used for executing periodic tasks such as distributed sends, buffer flushes, and message broker operations.

Columns:

- `pool` ([String](/docs/sql-reference/data-types/string)) — Pool name. Possible values:
  - `schedule` — General purpose schedule pool
  - `buffer_flush` — Pool for flushing Buffer table data
  - `distributed` — Pool for distributed table operations
  - `message_broker` — Pool for message broker operations
- `database` ([String](/docs/sql-reference/data-types/string)) — Database name.
- `table` ([String](/docs/sql-reference/data-types/string)) — Table name.
- `table_uuid` ([UUID](/docs/sql-reference/data-types/uuid)) — Table UUID.
- `query_id` ([String](/docs/sql-reference/data-types/string)) — Query ID (if executing now) (Note, it is not a real query, but just a randomly generated ID for matching logs in `system.text_log`).
- `elapsed_ms` ([UInt64](/docs/sql-reference/data-types/int-uint)) — Task execution time (if executing now).
- `log_name` ([String](/docs/sql-reference/data-types/string)) — Log name for the task.
- `deactivated` ([UInt8](/docs/sql-reference/data-types/int-uint)) — Whether the task is deactivated (always false, since deactivated tasks are removed from the pool).
- `scheduled` ([UInt8](/docs/sql-reference/data-types/int-uint)) — Whether the task is scheduled for execution.
- `delayed` ([UInt8](/docs/sql-reference/data-types/int-uint)) — Whether the task is scheduled with delay.
- `executing` ([UInt8](/docs/sql-reference/data-types/int-uint)) — Whether the task is currently executing.

**Example**

```
SELECT * FROM system.background_schedule_pool LIMIT 5 FORMAT Vertical;
```

```
Row 1:
──────
pool:        distributed
database:    default
table:       data
table_uuid:  00000000-0000-0000-0000-000000000000
query_id:
elapsed_ms:  0
log_name:    BackgroundJobsAssignee:DataProcessing
deactivated: 0
scheduled:   1
delayed:     0
executing:   0
```

**See Also**

- [system.background\_schedule\_pool\_log](/docs/operations/system-tables/background_schedule_pool_log) — Contains history of background schedule pool task executions.

Was this page helpful?
title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/build_options.md)

Contains information about the ClickHouse server's build options.

Columns:

- `name` ([String](/docs/sql-reference/data-types)) — Name of the build option.
- `value` ([String](/docs/sql-reference/data-types)) — Value of the build option.

**Example**

```
SELECT * FROM system.build_options LIMIT 5
```

```
┌─name─────────────┬─value─┐
│ USE_BROTLI       │ 1     │
│ USE_BZIP2        │ 1     │
│ USE_CAPNP        │ 1     │
│ USE_CASSANDRA    │ 1     │
│ USE_DATASKETCHES │ 1     │
└──────────────────┴───────┘
```

Was this page helpful?
title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/codecs.md)

Contains information about compression and encryption codecs.

You can use this table to get information about the available compression and encryption codecs

The `system.codecs` table contains the following columns (the column type is shown in brackets):

- `name` ([String](/docs/sql-reference/data-types)) — Codec name.
- `method_byte` ([UInt8](/docs/sql-reference/data-types)) — Byte which indicates codec in compressed file.
- `is_compression` ([UInt8](/docs/sql-reference/data-types)) — True if this codec compresses something. Otherwise it can be just a transformation that helps compression.
- `is_generic_compression` ([UInt8](/docs/sql-reference/data-types)) — The codec is a generic compression algorithm like lz4, zstd.
- `is_encryption` ([UInt8](/docs/sql-reference/data-types)) — The codec encrypts.
- `is_timeseries_codec` ([UInt8](/docs/sql-reference/data-types)) — The codec is for floating point timeseries codec.
- `is_experimental` ([UInt8](/docs/sql-reference/data-types)) — The codec is experimental.
- `description` ([String](/docs/sql-reference/data-types)) — A high-level description of the codec.

**Example**

Query:

```
SELECT * FROM system.codecs WHERE name='LZ4'
```

Result:

```
Row 1:
──────
name:                   LZ4
method_byte:            130
is_compression:         1
is_generic_compression: 1
is_encryption:          0
is_timeseries_codec:    0
is_experimental:        0
description:            Extremely fast; good compression; balanced speed and efficiency.
```

Was this page helpful?
title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/contributors.md)

Contains information about contributors. The order is random at query execution time.

Columns:

- `name` ([String](/docs/sql-reference/data-types)) — Contributor (author) name from git log.

**Example**

```
SELECT * FROM system.contributors LIMIT 10
```

```
┌─name─────────────┐
│ Olga Khvostikova │
│ Max Vetrov       │
│ LiuYangkuan      │
│ svladykin        │
│ zamulla          │
│ Šimon Podlipský  │
│ BayoNet          │
│ Ilya Khomutov    │
│ Amy Krishnevsky  │
│ Loud_Scream      │
└──────────────────┘
```

To find out yourself in the table, use a query:

```
SELECT * FROM system.contributors WHERE name = 'Olga Khvostikova'
```

```
┌─name─────────────┐
│ Olga Khvostikova │
└──────────────────┘
```

Was this page helpful?
title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/crash_log.md)

Querying in ClickHouse Cloud

The data in this system table is held locally on each node in ClickHouse Cloud. Obtaining a complete view of all data, therefore, requires the `clusterAllReplicas` function. See [here](/docs/operations/system-tables/overview#system-tables-in-clickhouse-cloud) for further details.

Contains information about stack traces for fatal errors. The table does not exist in the database by default, it is created only when fatal errors occur.

Columns:

- `hostname` ([LowCardinality(String)](/docs/sql-reference/data-types/string)) — Hostname of the server executing the query.
- `event_date` ([DateTime](/docs/sql-reference/data-types/datetime)) — Date of the event.
- `event_time` ([DateTime](/docs/sql-reference/data-types/datetime)) — Time of the event.
- `timestamp_ns` ([UInt64](/docs/sql-reference/data-types/int-uint)) — Timestamp of the event with nanoseconds.
- `signal` ([Int32](/docs/sql-reference/data-types/int-uint)) — Signal number.
- `thread_id` ([UInt64](/docs/sql-reference/data-types/int-uint)) — Thread ID.
- `query_id` ([String](/docs/sql-reference/data-types/string)) — Query ID.
- `trace` ([Array](/docs/sql-reference/data-types/array)([UInt64](/docs/sql-reference/data-types/int-uint))) — Stack trace at the moment of crash. Each element is a virtual memory address inside ClickHouse server process.
- `trace_full` ([Array](/docs/sql-reference/data-types/array)([String](/docs/sql-reference/data-types/string))) — Stack trace at the moment of crash. Each element contains a called method inside ClickHouse server process.
- `version` ([String](/docs/sql-reference/data-types/string)) — ClickHouse server version.
- `revision` ([UInt32](/docs/sql-reference/data-types/int-uint)) — ClickHouse server revision.
- `build_id` ([String](/docs/sql-reference/data-types/string)) — BuildID that is generated by compiler.

**Example**

Query:

```
SELECT * FROM system.crash_log ORDER BY event_time DESC LIMIT 1;
```

Result (not full):

```
Row 1:
──────
hostname:     clickhouse.eu-central1.internal
event_date:   2020-10-14
event_time:   2020-10-14 15:47:40
timestamp_ns: 1602679660271312710
signal:       11
thread_id:    23624
query_id:     428aab7c-8f5c-44e9-9607-d16b44467e69
trace:        [188531193,...]
trace_full:   ['3. DB::(anonymous namespace)::FunctionFormatReadableTimeDelta::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > const&, unsigned long, unsigned long) const @ 0xb3cc1f9 in /home/username/work/ClickHouse/build/programs/clickhouse',...]
version:      ClickHouse 20.11.1.1
revision:     54442
build_id:
```

**See also**

- [trace\_log](/docs/operations/system-tables/trace_log) system table

Was this page helpful?
title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/current_roles.md)

Contains active roles of a current user. `SET ROLE` changes the contents of this table.

Columns:

- `role_name` ([String](/docs/sql-reference/data-types/string))) — Role name.
- `with_admin_option` ([UInt8](/docs/sql-reference/data-types/int-uint#integer-ranges)) — Flag that shows whether `current_role` is a role with `ADMIN OPTION` privilege.
- `is_default` ([UInt8](/docs/sql-reference/data-types/int-uint#integer-ranges)) — Flag that shows whether `current_role` is a default role.

Was this page helpful?
title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/dashboards.md)

Contains queries used by `/dashboard` page accessible though [HTTP interface](/docs/interfaces/http).
This table can be useful for monitoring and troubleshooting. The table contains a row for every chart in a dashboard.

Note

`/dashboard` page can render queries not only from `system.dashboards`, but from any table with the same schema.
This can be useful to create custom dashboards.

Example:

```
SELECT *
FROM system.dashboards
WHERE title ILIKE '%CPU%'
```

```
Row 1:
──────
dashboard: overview
title:     CPU Usage (cores)
query:     SELECT toStartOfInterval(event_time, INTERVAL {rounding:UInt32} SECOND)::INT AS t, avg(ProfileEvent_OSCPUVirtualTimeMicroseconds) / 1000000
FROM system.metric_log
WHERE event_date >= toDate(now() - {seconds:UInt32}) AND event_time >= now() - {seconds:UInt32}
GROUP BY t
ORDER BY t WITH FILL STEP {rounding:UInt32}

Row 2:
──────
dashboard: overview
title:     CPU Wait
query:     SELECT toStartOfInterval(event_time, INTERVAL {rounding:UInt32} SECOND)::INT AS t, avg(ProfileEvent_OSCPUWaitMicroseconds) / 1000000
FROM system.metric_log
WHERE event_date >= toDate(now() - {seconds:UInt32}) AND event_time >= now() - {seconds:UInt32}
GROUP BY t
ORDER BY t WITH FILL STEP {rounding:UInt32}

Row 3:
──────
dashboard: overview
title:     OS CPU Usage (Userspace)
query:     SELECT toStartOfInterval(event_time, INTERVAL {rounding:UInt32} SECOND)::INT AS t, avg(value)
FROM system.asynchronous_metric_log
WHERE event_date >= toDate(now() - {seconds:UInt32}) AND event_time >= now() - {seconds:UInt32} AND metric = 'OSUserTimeNormalized'
GROUP BY t
ORDER BY t WITH FILL STEP {rounding:UInt32}

Row 4:
──────
dashboard: overview
title:     OS CPU Usage (Kernel)
query:     SELECT toStartOfInterval(event_time, INTERVAL {rounding:UInt32} SECOND)::INT AS t, avg(value)
FROM system.asynchronous_metric_log
WHERE event_date >= toDate(now() - {seconds:UInt32}) AND event_time >= now() - {seconds:UInt32} AND metric = 'OSSystemTimeNormalized'
GROUP BY t
ORDER BY t WITH FILL STEP {rounding:UInt32}
```

Columns:

- `dashboard` ([String](/docs/sql-reference/data-types)) — The dashboard name.
- `title` ([String](/docs/sql-reference/data-types)) — The title of a chart.
- `query` ([String](/docs/sql-reference/data-types)) — The query to obtain data to be displayed.

Was this page helpful?
title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/data_skipping_indices.md)

Contains information about existing data skipping indices in all the tables.

Columns:

- `database` ([String](/docs/sql-reference/data-types)) — Database name.
- `table` ([String](/docs/sql-reference/data-types)) — Table name.
- `name` ([String](/docs/sql-reference/data-types)) — Index name.
- `type` ([String](/docs/sql-reference/data-types)) — Index type.
- `type_full` ([String](/docs/sql-reference/data-types)) — Index type expression from create statement.
- `expr` ([String](/docs/sql-reference/data-types)) — Expression for the index calculation.
- `creation` ([Enum8('Explicit' = 0, 'Implicit' = 1)](/docs/sql-reference/data-types)) — Whether the index was created implicitly (via add\_minmax\_index\_for\_numeric\_columns or similar)
- `granularity` ([UInt64](/docs/sql-reference/data-types)) — The number of granules in the block.
- `data_compressed_bytes` ([UInt64](/docs/sql-reference/data-types)) — The size of compressed data, in bytes.
- `data_uncompressed_bytes` ([UInt64](/docs/sql-reference/data-types)) — The size of decompressed data, in bytes.
- `marks_bytes` ([UInt64](/docs/sql-reference/data-types)) — The size of marks, in bytes.

**Example**

```
SELECT * FROM system.data_skipping_indices LIMIT 2 FORMAT Vertical;
```

```
Row 1:
──────
database:                default
table:                   user_actions
name:                    clicks_idx
type:                    minmax
type_full:               minmax
expr:                    clicks
creation:                Explicit
granularity:             1
data_compressed_bytes:   58
data_uncompressed_bytes: 6
marks_bytes:             48

Row 2:
──────
database:                default
table:                   users
name:                    contacts_null_idx
type:                    minmax
type_full:               minmax
expr:                    assumeNotNull(contacts_null)
creation:                Explicit
granularity:             1
data_compressed_bytes:   58
data_uncompressed_bytes: 6
marks_bytes:             48
```

Was this page helpful?
title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/data_type_families.md)

Contains information about supported [data types](/docs/sql-reference/data-types).

Columns:

- `name` ([String](/docs/sql-reference/data-types)) — Data type name.
- `case_insensitive` ([UInt8](/docs/sql-reference/data-types)) — Property that shows whether you can use a data type name in a query in case insensitive manner or not. For example, `Date` and `date` are both valid.
- `alias_to` ([String](/docs/sql-reference/data-types)) — Data type name for which `name` is an alias.

**Example**

```
SELECT * FROM system.data_type_families WHERE alias_to = 'String'
```

```
┌─name───────┬─case_insensitive─┬─alias_to─┐
│ LONGBLOB   │                1 │ String   │
│ LONGTEXT   │                1 │ String   │
│ TINYTEXT   │                1 │ String   │
│ TEXT       │                1 │ String   │
│ VARCHAR    │                1 │ String   │
│ MEDIUMBLOB │                1 │ String   │
│ BLOB       │                1 │ String   │
│ TINYBLOB   │                1 │ String   │
│ CHAR       │                1 │ String   │
│ MEDIUMTEXT │                1 │ String   │
└────────────┴──────────────────┴──────────┘
```

**See Also**

- [Syntax](/docs/sql-reference/syntax) — Information about supported syntax.

Was this page helpful?
title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/database_engines.md)

Contains the list of database engines supported by the server.

This table contains the following columns (the column type is shown in brackets):

- `name` ([String](/docs/sql-reference/data-types)) — The name of database engine.

Example:

```
SELECT *
FROM system.database_engines
WHERE name IN ('Atomic', 'Lazy', 'Ordinary')
```

```
┌─name─────┐
│ Ordinary │
│ Atomic   │
│ Lazy     │
└──────────┘
```

Was this page helpful?
title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/database_replicas.md)

Contains information of each Replicated database replicas.

Columns:

- `database` ([String](/docs/sql-reference/data-types)) — The name of the Replicated database is in.
- `is_readonly` ([UInt8](/docs/sql-reference/data-types)) — Whether the database replica is in read-only mode.
- `max_log_ptr` ([Int32](/docs/sql-reference/data-types)) — Maximum entry number in the log of general activity.
- `replica_name` ([String](/docs/sql-reference/data-types)) — Replica name in ClickHouse Keeper.
- `replica_path` ([String](/docs/sql-reference/data-types)) — Path to replica data in ClickHouse Keeper.
- `zookeeper_path` ([String](/docs/sql-reference/data-types)) — Path to database data in ClickHouse Keeper.
- `shard_name` ([String](/docs/sql-reference/data-types)) — The name of the shard in the cluster.
- `log_ptr` ([Int32](/docs/sql-reference/data-types)) — Maximum entry number in the log of general activity that the replica copied to its execution queue, plus one.
- `total_replicas` ([UInt32](/docs/sql-reference/data-types)) — The total number of known replicas of this database.
- `zookeeper_exception` ([String](/docs/sql-reference/data-types)) — The last exception message, got if the error happened when fetching the info from ClickHouse Keeper.
- `is_session_expired` ([UInt8](/docs/sql-reference/data-types)) — The session with ClickHouse Keeper has expired. Basically the same as `is_readonly`.

**Example**

```
SELECT * FROM system.database_replicas FORMAT Vertical;
```

```
Row 1:
──────
database:            db_2
is_readonly:         0
max_log_ptr:         2
replica_name:        replica1
replica_path:        /test/db_2/replicas/shard1|replica1
zookeeper_path:      /test/db_2
shard_name:          shard1
log_ptr:             2
total_replicas:      1
zookeeper_exception: 
is_session_expired:  0
```

Was this page helpful?
title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/databases.md)

Contains information about the databases that are available to the current user.

Columns:

- `name` ([String](/docs/sql-reference/data-types)) — Database name.
- `engine` ([String](/docs/sql-reference/data-types)) — Database engine.
- `data_path` ([String](/docs/sql-reference/data-types)) — Data path.
- `metadata_path` ([String](/docs/sql-reference/data-types)) — Metadata path.
- `uuid` ([UUID](/docs/sql-reference/data-types)) — Database UUID.
- `engine_full` ([String](/docs/sql-reference/data-types)) — Parameters of the database engine.
- `comment` ([String](/docs/sql-reference/data-types)) — Database comment.
- `is_external` ([UInt8](/docs/sql-reference/data-types)) — Database is external (i.e. PostgreSQL/DataLakeCatalog).

The `name` column from this system table is used for implementing the `SHOW DATABASES` query.

**Example**

Create a database.

```
CREATE DATABASE test;
```

Check all of the available databases to the user.

```
SELECT * FROM system.databases;
```

```
┌─name────────────────┬─engine─────┬─data_path────────────────────┬─metadata_path─────────────────────────────────────────────────────────┬─uuid─────────────────────────────────┬─engine_full────────────────────────────────────────────┬─comment─┐
│ INFORMATION_SCHEMA  │ Memory     │ /data/clickhouse_data/       │                                                                       │ 00000000-0000-0000-0000-000000000000 │ Memory                                                 │         │
│ default             │ Atomic     │ /data/clickhouse_data/store/ │ /data/clickhouse_data/store/f97/f97a3ceb-2e8a-4912-a043-c536e826a4d4/ │ f97a3ceb-2e8a-4912-a043-c536e826a4d4 │ Atomic                                                 │         │
│ information_schema  │ Memory     │ /data/clickhouse_data/       │                                                                       │ 00000000-0000-0000-0000-000000000000 │ Memory                                                 │         │
│ replicated_database │ Replicated │ /data/clickhouse_data/store/ │ /data/clickhouse_data/store/da8/da85bb71-102b-4f69-9aad-f8d6c403905e/ │ da85bb71-102b-4f69-9aad-f8d6c403905e │ Replicated('some/path/database', 'shard1', 'replica1') │         │
│ system              │ Atomic     │ /data/clickhouse_data/store/ │ /data/clickhouse_data/store/b57/b5770419-ac7a-4b67-8229-524122024076/ │ b5770419-ac7a-4b67-8229-524122024076 │ Atomic                                                 │         │
└─────────────────────┴────────────┴──────────────────────────────┴───────────────────────────────────────────────────────────────────────┴──────────────────────────────────────┴────────────────────────────────────────────────────────┴─────────┘
```

Was this page helpful?
title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/delta_metadata_log.md)

The `system.delta_lake_metadata_log` table records metadata access and parsing events for Delta Lake tables read by ClickHouse. It provides detailed information about each metadata file, which is useful for debugging, auditing, and understanding Delta table structure evolution.

## Purpose[​](#purpose "Direct link to Purpose")

This table logs every metadata file read from Delta Lake tables. It helps users trace how ClickHouse interprets Delta table metadata and diagnose issues related to schema evolution, snapshot resolution, or query planning.

Note

This table is primarily intended for debugging purposes.

## Columns[​](#columns "Direct link to Columns")

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Name Type Description|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `event_date` [Date](/docs/sql-reference/data-types/date) Date of the log file.|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `event_time` [DateTime](/docs/sql-reference/data-types/datetime) Timestamp of the event.|  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `query_id` [String](/docs/sql-reference/data-types/string) Query ID that triggered the metadata read.|  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `table_path` [String](/docs/sql-reference/data-types/string) Path to the Delta Lake table.|  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | | `file_path` [String](/docs/sql-reference/data-types/string) Path to the root metadata JSON file.|  |  |  | | --- | --- | --- | | `content` [String](/docs/sql-reference/data-types/string) Content in JSON format (raw metadata from .json). | | | | | | | | | | | | | | | | | | | | |

Querying in ClickHouse Cloud

The data in this system table is held locally on each node in ClickHouse Cloud. Obtaining a complete view of all data, therefore, requires the `clusterAllReplicas` function. See [here](/docs/operations/system-tables/overview#system-tables-in-clickhouse-cloud) for further details.

## Controlling log verbosity[​](#controlling-log-verbosity "Direct link to Controlling log verbosity")

You can control which metadata events are logged using the [`delta_lake_log_metadata`](/docs/operations/settings/settings#delta_lake_log_metadata) setting.

To log all metadata used in the current query:

```
SELECT * FROM my_delta_table SETTINGS delta_lake_log_metadata = 1;

SYSTEM FLUSH LOGS delta_lake_metadata_log;

SELECT *
FROM system.delta_lake_metadata_log
WHERE query_id = '{previous_query_id}';
```

- [Purpose](#purpose)- [Columns](#columns)- [Controlling log verbosity](#controlling-log-verbosity)

Was this page helpful?