本文共 428 字,大约阅读时间需要 1 分钟。
select table AS `表名`, sum(rows) as row, formatReadableSize(sum(data_uncompressed_bytes)) as `原始大小`,formatReadableSize(sum(data_compressed_bytes)) as `压缩后`,round(sum(data_compressed_bytes) / sum(data_uncompressed_bytes) * 100, 0) `压缩率` from system.parts WHERE table IN ('tut') GROUP BY table
建表
CREATE TABLE tut.`data_from` (`id` UInt32,`content` String,`create_time` Date)COMMENT='数据源'COLLATE='utf8_general_ci'ENGINE=MergeTree()
转载地址:http://jpepi.baihongyu.com/