Java知识分享网 - 轻松学习从此开始!    

Java知识分享网

Java1234官方群25:java1234官方群17
Java1234官方群25:838462530
        
SpringBoot+SpringSecurity+Vue+ElementPlus权限系统实战课程 震撼发布        

最新Java全栈就业实战课程(免费)

springcloud分布式电商秒杀实战课程

IDEA永久激活

66套java实战课程无套路领取

锋哥开始收Java学员啦!

Python学习路线图

锋哥开始收Java学员啦!
当前位置: 主页 > Java文档 > Java基础相关 >

Tricks every ClickHouse designer should know PDF 下载


分享到:
时间:2020-08-06 11:43来源:http://www.java1234.com 作者:小锋  侵权举报
Tricks every ClickHouse designer should know PDF 下载
失效链接处理
Tricks every ClickHouse designer should know PDF 下载


本站整理下载:
提取码:gbpi 
 
 
相关截图:
 
主要内容:

CREATE TABLE test_codecs ( a String,
a_lc LowCardinality(String) DEFAULT a,
b UInt32,
b_delta UInt32 DEFAULT b Codec(Delta),
b_delta_lz4 UInt32 DEFAULT b Codec(Delta, LZ4),
 b_dd UInt32 DEFAULT b Codec(DoubleDelta),
 b_dd_lz4 UInt32 DEFAULT b Codec(DoubleDelta, LZ4)
)
Engine = MergeTree 
PARTITION BY tuple() ORDER BY tuple();
INSERT INTO test_codecs (a, b)
 SELECT
concat('a string prefix', 
 toString(rand() % 1000)),
now() + (number * 10)
 FROM system.numbers 
 LIMIT 100000000 
 SETTINGS max_block_size=1000000
 
 
 SELECT a AS a, count(*) AS c FROM test_codecs
GROUP BY a ORDER BY c ASC LIMIT 10
. . .
10 rows in set. Elapsed: 0.681 sec. Processed 100.00 million 
rows, 2.69 GB (146.81 million rows/s., 3.95 GB/s.)
Faster
SELECT a_lc AS a, count(*) AS c FROM test_codecs
GROUP BY a ORDER BY c ASC LIMIT 10
. . .
10 rows in set. Elapsed: 0.148 sec. Processed 100.00 million 
rows, 241.16 MB (675.55 million rows/s., 1.63 GB/s.)


 

------分隔线----------------------------

锋哥公众号


锋哥微信


关注公众号
【Java资料站】
回复 666
获取 
66套java
从菜鸡到大神
项目实战课程

锋哥推荐