跳转到主内容
跳转到主内容

system.dropped_tables

描述

包含已执行 DROP TABLE 语句但尚未完成数据清理的表的信息。

  • index (UInt32) — marked_dropped_tables 队列中的索引。
  • database (String) — 数据库名称。
  • table (String) — 表名。
  • uuid (UUID) — 表 UUID。
  • engine (String) — 表引擎名称。
  • metadata_dropped_path (String) — metadata_dropped 目录中该表元数据文件的路径。
  • table_dropped_time (DateTime) — 计划下一次尝试删除该表数据的时间。通常是该表被删除的时间加上 database_atomic_delay_before_drop_table_sec

示例

以下示例演示如何获取关于 dropped_tables 的信息。

SELECT *
FROM system.dropped_tables\G
Row 1:
──────
index:                 0
database:              default
table:                 test
uuid:                  03141bb2-e97a-4d7c-a172-95cc066bb3bd
engine:                MergeTree
metadata_dropped_path: /data/ClickHouse/build/programs/data/metadata_dropped/default.test.03141bb2-e97a-4d7c-a172-95cc066bb3bd.sql
table_dropped_time:    2023-03-16 23:43:31