CrateDB记录

1、集群情况

3个节点

2、数据量情况

表数据情况 | 分区个数 | 单分区数据情况 | 明细查询耗时 | 聚合查询耗时(上面使用的是聚合查询1,下面使用的是聚合查询2
1亿, 21.6G | 15 | 6672037, 1.4GB|0.857, 0.411, 0.037|5.456, 5.144, 4.942
66亿, 2.1T | 75 | 238188342, 76.5GB|2.303, 2.511, 0.374|30.303, 26.908,25.574

表数据情况 |  分区个数 |  单分区数据情况 |  明细查询耗时 |  聚合查询耗时(上面的是聚合查询1,下面的是聚合查询2)
1亿, 21.6G |  15 | 6672037, 1.4GB |  0.857, 0.411, 0.037 |  5.456, 5.144, 4.942
66亿, 2.1T |  75 | 238188342, 76.5GB |  2.303, 2.511, 0.374 |  30.303, 26.908,25.574


明细查询

SELECT fexec_date,fexec_hhmm,finterface,fserver_ip,fset,fproduct_name,fcall_num,ferror_num,fcall_time,fmax_call_time,fmin_call_time
FROM test_cratedb_10y
WHERE fexec_date>='2017-03-11' AND fexec_date<='2017-03-11' AND finterface='com.tencent.ieg.clean'
ORDER BY fexec_hhmm
LIMIT 10;

聚合查询1

SELECT fexec_date,fexec_hhmm,finterface,fserver_ip,fproduct_name,COUNT(fcall_num),COUNT(DISTINCT fserver_ip),SUM(ferror_num),AVG(fcall_time),MAX(fmax_call_time),MIN(fmin_call_time)
FROM test_cratedb_10y
WHERE fexec_date='2017-03-11' AND finterface='com.tencent.ieg.clean'
GROUP BY fexec_date,fexec_hhmm,finterface,fserver_ip,fproduct_name
ORDER BY fexec_hhmm
LIMIT 10;

使用聚合查询1,查询大数据量,超时不返回数据。


聚合查询2

SELECT fexec_date,fexec_hhmm,finterface,COUNT(fcall_num),COUNT(DISTINCT fserver_ip),SUM(ferror_num),AVG(fcall_time),MAX(fmax_call_time),MIN(fmin_call_time)
FROM test_cratedb_10y
WHERE fexec_date='2017-03-11' AND finterface='com.tencent.ieg.clean'
GROUP BY fexec_date,fexec_hhmm,finterface
ORDER BY fexec_hhmm
LIMIT 10;





评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值