clickhouse报 单个插入块的分区太多 的异常
发布于 4 个月前 作者 otherhy 823 次浏览 来自 问答

报错信息: Too many partitions for single INSERT block (more than 100). The limit is controlled by ‘max_partitions_per_insert_block’ setting. Large number of partitions is a common misconception. It will lead to severe negative performance impact, including slow server startup, slow INSERT queries and slow SELECT queries. Recommended total number of partitions for a table is under 1000…10000. Please note, that partitioning is not intended to speed up SELECT queries (ORDER BY key is sufficient to make range queries fast). Partitions are intended for data manipulation (DROP PARTITION, etc). (version 19.6.2.11 (official build))

尝试处理: 通过信息,我们将max_partitions_per_insert_block参数修改为2000,但是该异常仍没有解决; 后来我们担心是批处理插入数据过大导致的(单次批量执行5000条插入),但是将单次插入缩减到500仍然会有问题;

希望有大神能帮忙看下这个问题是什么原因导致的,感谢。

2 回复

你的分区的规则是什么,把建表语句给一下吧

这个基本无解。如果能容忍少数数据异常,可以使用buffe表

回到顶部