【Clickhouse】Too many partitions for single INSERT block (more than 100)

139 篇文章 635 订阅 ¥19.90 ¥99.00
在批量插入Clickhouse表时遇到内存不足(OOM kill)错误,由于单次插入数据跨越365个分区,导致问题。解决方案包括调整分区策略和设置`max_partitions_per_insert_block`参数,尝试将其设置为5000,但发现该参数需在用户全局配置文件中生效。最终通过在`user.xml`中添加配置并重启Clickhouse服务器解决了问题,实现了高效的数据导入。
摘要由CSDN通过智能技术生成

在这里插入图片描述

1.概述

我们10秒写入一次数据到ck A表(一次时间相同 500条以内条数),然后有个物化视图是B表, 但是偶然看见 报错 OOM kill

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.. 0000. Please note, that partitioning is not intended to speed up SEL ECT queries (ORDER BY key is sufficient to make range queries fast). Partitions are intended for data manipulation (DROP PARTITION, etc). (version 21.2.4.6 official build)) (from 72118.1.22:44398) (in query: INSERT INTO ailpha_security_merge_alarm_handlel (windowld, aggCondition, alarmStatu

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

九师兄

你的鼓励是我做大写作的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值