gpt4 book ai didi

clickhouse - 了解 clickhouse 分区

转载 作者:行者123 更新时间:2023-12-01 19:54:48 25 4
gpt4 key购买 nike

我看到 clickhouse 为每个分区键(在每个节点中)创建了多个目录。
文档说目录名称格式是:分区ID_最小块号_最大块号_级别。
知道这里是什么水平吗?
一个节点(一个表)上的 347 个不同的分区键创建了 1358 个目录。 (自定义分区)

文档建议不要有超过 1000 个分区。我们应该只记住分区键的数量还是目录的数量?

另外,是否有关于如何控制此目录数量的配置?

enter image description here

最佳答案

Any idea what is level here?



级别是 LSM-tree 的概念. MergeTree 表具有将数据部分合并为更大和更深(w.r.t 级别)的机制。

Should we just keep in mind the number of partitions keys or the number of directories also?



好吧,我认为这不是一个好主意,因为这种方法不能很好地扩展。您最好选择低基数列或表达式作为分区键。

Also, Is there a configuration on how to control this number of directories?



没有明确的设置。但是您可以轻松地使用模块化表达式来限制分区的总数。

关于clickhouse - 了解 clickhouse 分区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51770966/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com