描述
包含已执行 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。
此表仅列出从 Atomic 数据库中删除的表。对于这些表,table_dropped_time 通常由 database_atomic_delay_before_drop_table_sec 决定。对于 ClickHouse Cloud 中的 Shared 数据库,恢复期则由 database_shared_drop_table_delay_seconds 控制,默认值为 8 小时;从 Shared 数据库中删除的表不会出现在 system.dropped_tables 中。
示例
以下示例说明如何获取 dropped_tables 的相关信息。
SELECT *
FROM system.dropped_tables\GRow 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