如何显示 ClickHouse 数据库中 table 正在使用的引擎?

How to show what engine is being in-used of a table in ClickHouse database?

是否有任何命令/SQL 可以显示 ClickHouse 数据库中 table 正在使用的引擎?

create table t (id UInt16, name String) ENGINE = Memory;
insert into t(id, name) values (1, 'abc'), (2, 'xyz');

create table t2 as t ENGINE = TinyLog;
insert into t2(id, name) values (3, 'efg'), (4, 'hij');

create table t3 ENGINE = Log as select * from t;

describe 命令不显示引擎信息

describe t

我如何知道正在使用哪个引擎?

如果你运行

SHOW CREATE TABLE t

它将为您提供重新创建 table t 并包含引擎信息的查询。

或运行

SELECT database, name, engine, engine_full
FROM system.tables