Skip to main content

描述

包含服务器所知晓的每个表的元数据。 Detached 表不会显示在 system.tables 中。 临时表 仅在创建它们的那些会话的 system.tables 中可见。它们的 database field 为空,且 is_temporary 标志已启用。

  • database (String) — 该表所在的数据库名称。
  • name (String) — 表名称。
  • uuid (UUID) — 表 UUID (Atomic 数据库) 。
  • engine (String) — 表引擎名称 (不含参数) 。
  • is_temporary (UInt8) — 指示该表是否为临时表的标志。
  • data_paths (Array(String)) — 文件系统中表数据的路径。
  • metadata_path (String) — 文件系统中表元数据的路径。
  • metadata_modification_time (DateTime) — 表元数据的最后修改时间。
  • metadata_version (Int32) — ReplicatedMergeTree 表的元数据版本;非 ReplicatedMergeTree 表为 0。
  • dependencies_database (Array(String)) — 数据库依赖项。
  • dependencies_table (Array(String)) — 表依赖项 (以当前表为源表的 materialized view) 。
  • create_table_query (String) — 用于创建该表的查询。
  • engine_full (String) — 表引擎参数。
  • as_select (String) — 视图的 SELECT 查询。
  • parameterized_view_parameters (Array(Tuple(name String, type String))) — parameterized view 的参数。
  • partition_key (String) — 表中指定的分区键表达式。
  • sorting_key (String) — 表中指定的排序键表达式。
  • primary_key (String) — 表中指定的主键表达式。
  • sampling_key (String) — 表中指定的采样键表达式。
  • unique_key (String) — 表中指定的唯一键表达式 (UNIQUE KEY 子句) 。
  • skipping_indices_types (Array(String)) — 表上定义的数据跳过索引的不同类型数组 (例如 minmax、set、bloom_filter、ngrambf_v1、tokenbf_v1、text、vector_similarity) 。没有跳过索引的表为空。
  • storage_policy (String) — 存储策略。适用于使用 MergeTree 和 Distributed 引擎的表。
  • total_rows (Nullable(UInt64)) — 行总数:如果可以快速确定表中的精确行数,则返回该数值;否则返回 NULL (包括底层 Buffer 表) 。
  • total_bytes (Nullable(UInt64)) — 总字节数:如果可以快速确定表在存储中的精确字节数,则返回该数值;否则返回 NULL (不包括任何底层存储) 。如果表将数据存储在磁盘上,则返回已用磁盘空间 (即压缩后的大小) ;如果表将数据存储在内存中,则返回已用内存字节数的估算值。
  • total_bytes_uncompressed (Nullable(UInt64)) — 未压缩字节总数:如果可以根据存储中该表分片的校验和快速确定精确字节数,则返回该数值;否则返回 NULL (不考虑底层存储,如有) 。
  • parts (Nullable(UInt64)) — 此表中 parts 的总数。
  • active_parts (Nullable(UInt64)) — 此表中活跃 parts 的数量。
  • total_marks (Nullable(UInt64)) — 此表中所有 parts 的标记总数。
  • active_on_fly_data_mutations (UInt64) — 可即时应用的活跃数据变更 (UPDATE 和 DELETE) 总数。
  • active_on_fly_alter_mutations (UInt64) — 可即时应用的活跃 ALTER 变更 (MODIFY COLUMN) 总数。
  • active_on_fly_metadata_mutations (UInt64) — 可即时应用的活跃元数据变更 (RENAME) 总数。
  • columns_descriptions_cache_size (UInt64) — *MergeTree 表的列描述缓存大小
  • lifetime_rows (Nullable(UInt64)) — 自服务器启动以来 INSERT 的行总数 (仅适用于 Buffer 表) 。
  • lifetime_bytes (Nullable(UInt64)) — 自服务器启动以来 INSERT 的字节总数 (仅适用于 Buffer 表) 。
  • comment (String) — 表的注释。
  • has_own_data (UInt8) — 指示该表自身是否将数据存储在磁盘上,还是仅访问其他源的标志。
  • loading_dependencies_database (Array(String)) — 数据库加载依赖项 (应在当前对象之前加载的对象列表) 。
  • loading_dependencies_table (Array(String)) — 表加载依赖项 (应在当前对象之前加载的对象列表) 。
  • loading_dependent_database (Array(String)) — 依赖于加载当前对象的数据库。
  • loading_dependent_table (Array(String)) — 依赖于加载当前对象的表。
  • target_database (String) — 对于 materialized view,视图写入的目标端表所在的数据库 (TO 目标,或隐式 .inner.* 表) 。其他引擎为空。
  • target_table (String) — 对于 materialized view,视图写入的目标端表名称 (TO 目标,或隐式 .inner.* 表) 。其他引擎为空。
  • definer (String) — 该表使用的 SQL security definer 名称。
别名:
  • tablename 的别名。

示例

最后修改于 2026年8月14日