请教个Hologres问题,建表时报错:执行失败,失败原因:这是什么原因呀?

请教个Hologres问题,建表时报错:执行失败,失败原因:ERROR: commit ddl phase1 failed: too many shards in this instance, the threshold is 16, now 20 used
Hint: a resharding procedure is required, otherwise use SET hg_experimental_enable_shard_count_cap=off to change this limit for the current session; or ALTER DATABASE ... SET hg_experimental_enable_shard_count_cap=off to change this limit on the database level.
there is no event_time_column or segment_key property specified for table bs_third_req_record, using column gmt_create as the default one
这是什么原因呀?

展开
收起
真的很搞笑 2023-12-25 09:36:33 199 分享 版权
3 条回答
写回答
取消 提交回答
  • 面对过去,不要迷离;面对未来,不必彷徨;活在今天,你只要把自己完全展示给别人看。

    这个错误是由于Hologres实例中的分片数量超过了阈值(16个),需要进行重新分片操作。同时,表bs_third_req_record中没有指定event_time_column或segment_key属性,因此使用了默认的gmt_create列作为分片键。

    解决方法:

    1. 使用SET hg_experimental_enable_shard_count_cap=off命令在当前会话中更改分片数量限制。
    2. 或者,使用ALTER DATABASE ... SET hg_experimental_enable_shard_count_cap=off命令在数据库级别更改分片数量限制。
    3. 为表bs_third_req_record添加event_time_column或segment_key属性,以便正确进行分片。
    2023-12-26 14:52:06
    赞同 展开评论
  • 实例推测是个8Core的实例 最多支持16个shard shard超出core数 对性能有损伤acf13b85c1190a29de6e65d7ea8ac8d0.png
    ,此回答整理自钉群“实时数仓Hologres交流群”

    2023-12-25 17:03:34
    赞同 展开评论
  • 关于Hologres的建表错误,原因是在当前实例中分片数量超过了限制(阈值为16,但现在使用了20个)。提示需要进行resharding操作,或者关闭hg_experimental_enable_shard_count_cap的限制。同时,还提示在bs_third_req_record表中没有指定event_time_column或segment_key属性,因此将使用gmt_create作为默认的事件时间列。

    2023-12-25 16:45:06
    赞同 展开评论

本技术圈将为大家分析有关阿里云产品Hologres的最新产品动态、技术解读等,也欢迎大家加入钉钉群--实时数仓Hologres交流群32314975

还有其他疑问?
咨询AI助理