为了更快的定位您的问题,请提供以下信息,谢谢
【详述】创建动态分区表执行成功之后,没有做到动态分区,已经经过10分钟的分区刷新时间,show partition 展示的是所有的分区,并不是部分分区
【业务影响】
【StarRocks版本】例如:2.5.5
建表sql : CREATE TABLE xxx
(
plandate
datetime COMMENT ‘拜访计划时间’
, planid
bigint COMMENT ‘拜访计划ID’
, y
bigint COMMENT ‘年’
, ym
bigint COMMENT ‘年月’
, ymd
bigint COMMENT ‘年月日’
, status
bigint COMMENT ‘状态’
, userinfoid
bigint COMMENT ‘用户ID’
, storeid
bigint COMMENT ‘门店ID’
,version
DateTime DEFAULT current_timestamp COMMENT ‘版本’
) ENGINE = olap
PRIMARY KEY(plandate
,planid
)
PARTITION BY RANGE(plandate
)(
START (“2020-01-01”) END (“2030-01-01”) EVERY (INTERVAL 1 month)
)
DISTRIBUTED BY HASH(plandate
,planid
) BUCKETS 36
PROPERTIES (
“dynamic_partition.time_unit” = “MONTH”,
“dynamic_partition.end” = “2”,
“dynamic_partition.prefix” = “p”
)
表的属性中需要开启动态分区:“dynamic_partition.enable” = “true”