ByteHouse provides a variety of system tables. You can query these system tables to obtain various information about the database.
| | | \
| Name | Description | |
|---|---|---|
| \ | ||
| system.databases | Contains information about all databases in the current environment, including database name, engine, storage path, unique identifier, and more. This table can be used to quickly view the database list and core attributes. | |
| \ | ||
| system.tables | Contains information about all tables, covering key attributes such as the table's engine, structure (partition/sorting/primary key), storage path, and data volume. This is the core system table for viewing table structure and auditing table configuration. | |
| \ | ||
| system.columns | Contains information about all columns, including column type, position, key association, compression status, and other metadata. This table can be used to view table structure details and analyze column storage characteristics. | |
| \ | ||
| system.settings | Contains current system settings and their values, including setting name, value, modification permissions, and other key information. This table can be used to view current configuration and troubleshoot parameter-related issues. | |
| \ | ||
| system.mutations | Contains information about ongoing data modification operations (such as UPDATE, DELETE, ALTER). |
| | | \
| Name | Description | |
|---|---|---|
| \ | ||
| system.cnch_parts | Contains information about all stored data parts, including part storage, status, transaction, associated tables, and other key attributes. This table can be used to monitor part lifecycle and troubleshoot data storage issues. | \ |
It is recommended to use this system table instead of system.parts. |
| | | \
| Name | Description | |
|---|---|---|
| \ | ||
| system.cnch_view_tables | Contains detailed information about all materialized views in the current database, including the definition of materialized views, associated base tables, refresh configuration, status information, and more. This table helps you monitor and manage the configuration and operational status of materialized views. |
| | | \
| Name | Description | |
|---|---|---|
| \ | ||
| system.cnch_table_info | Shows the current maximum and minimum BSN of a table. Fast query speed; suitable for scenarios where only the maximum and minimum BSN of a table need to be queried. | |
| \ | ||
| system.cnch_binlogs | Shows detailed information about each Binlog part of a table. Before reading a Binlog part, you can use this system table to query detailed information and customize the reading method. |
| | | \
| Name | Description | |
|---|---|---|
| \ | ||
| system.functions | Contains information about regular functions and Aggregate functions. You can search this table to understand the basic properties of the functions. | |
| \ | ||
| system.one | A virtual table containing a single row and a single column. | |
| \ | ||
| system.time_zones | Contains the list of time zones supported by ByteHouse servers. | |
| \ | ||
| system.numbers | Generates a series of consecutive integers starting from 0, suitable for generating test data or for data filling. | |
| \ | ||
| system.numbers_mt | Generates a series of consecutive integers starting from 0, with parallelized reading. Numbers can be returned in any order, suitable for generating test data or for data filling. | |
| \ | ||
| system.zeros | Generates a series of integers whose value is always 0, suitable for generating test data with fixed default values or for placeholder filling during numerical calculations. |