clickhouse 通过 SummingMergeTree 优化查询
背景:通过 clickhouse 统计 pv
现有一张表
create table click_event( id String comment '点击ID', cid UInt64 comment '用户ID', created_time DateTime comment '点击时间') ENGINE = MergeTreeorder by id;
该表为 click_event ,用户每点击一次,向该表写入一条数据。
写入测试数据
insert into click_e
原创
2021-06-23 19:59:51 ·
321 阅读 ·
0 评论