Clickhouse share

2019-10-18  本文已影响0人  Ary_zz

2019-10-18

clickhouse

basic

定义分布式表需确定cluster name (system.cluster查看)

shards规则可选,随机rand(),按string字段sipHash(xxx)

推荐通过分布式表做查询,写入本地表

feature

merge tree

GraphiteMergeTree

实时数据,按时间版本

ReplacingMergeTree

按主键去重

Concurrent Data Access

For concurrent table access, we use multi-versioning. In other words, when a table is simultaneously read and updated, data is read from a set of parts that is current at the time of the query. There are no lengthy locks. Inserts do not get in the way of read operations.

磁盘格式

View 增量 建议batch

query

array join 行列转换 (datatype=array)

server 扫描配置文件/30s

副本表

layer-shard/table,(replica)

zk

以part为粒度做merge,保证副本

autopurge.snapRetainCount

replica间同步merge,zk管理merge是否一致

避免小part

上一篇 下一篇

猜你喜欢

热点阅读