clickhouse - 如何显示 ClickHouse 数据库中的表正在使用什么引擎?
问题描述
是否有任何命令/SQL 可以显示 ClickHouse 数据库中的表正在使用什么引擎?
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
它将为您提供查询以重新创建t
包含 ENGINE 信息的表。
或运行
SELECT database, name, engine, engine_full
FROM system.tables
推荐阅读
- java - 如何通过 URI 复制文件
- java - Springboot 调用 ESAPI 显示异常
- jquery - Rails 5:如何运行 edit.js.erb 文件
- java - 使用@AllowFeature 控制器方法播放Framework 1.x 功能测试
- c# - c#设置gcServer启用后不创建转储文件
- typescript - 打字稿 find() 并返回索引
- node.js - 将 GraphQL Schema 公开为 REST api 的方法有哪些?
- typescript - 无法在开玩笑的单元测试中模拟分页功能
- python - 有没有一种超级简单的方法来替换用户提示中的多个字符?(Python)
- sockets - 私人 P2P 聊天(NAT 穿越问题)