为了更快的定位您的问题,请提供以下信息,谢谢
【详述】升级3.3.7版本后发现部分sql执行计划生成失败 很简单的sql 我们有两个集群 一个3.3.6一个3.3.7都有一样的问题
select “dt” AS “dt”, “warehouse_mapping_code” AS “warehouse_mapping_code”, “origin_data” AS “origin_data”, “yuce_cube_shop_id” AS “yuce_cube_shop_id”
from ods_api_wdtqjqm_sale_outstock_info_f
where (dt = ‘9999-12-31’) or ( dt between ‘2024-11-09’ and ‘2024-12-09’ ) limit 1
修改配置后查询正常
SCAN_OR_TO_UNION_LIMIT=0
SCAN_OR_TO_UNION_THRESHOLD=999999999999
【背景】做过哪些操作?
【业务影响】
【是否存算分离】存算一体
【StarRocks版本】例如:3.3.6,3.3.7
【集群规模】例如:3fe(1 follower+2observer)+5be(fe与be混部)
【机器信息】CPU虚拟核/内存/网卡,例如:48C/64G/万兆
【联系方式】社区群22 hpp
【附件】
- fe.log/beINFO/相应截图
建表语句
CREATE TABLE ods_api_wdtqjqm_sale_outstock_info_f
(
dt
datetime NOT NULL,
__id
bigint(20) NOT NULL AUTO_INCREMENT,
stockout_id
varchar(1048576) NULL,
order_no
varchar(1048576) NULL,
src_order_no
varchar(1048576) NULL,
warehouse_no
varchar(1048576) NULL,
warehouse_name
varchar(1048576) NULL,
consign_time
varchar(1048576) NULL,
order_type
varchar(1048576) NULL,
goods_count
varchar(1048576) NULL,
logistics_no
varchar(1048576) NULL,
receiver_country
varchar(1048576) NULL,
receiver_province
varchar(1048576) NULL,
receiver_city
varchar(1048576) NULL,
receiver_district
varchar(1048576) NULL,
receiver_zip
varchar(1048576) NULL,
receiver_area
varchar(1048576) NULL,
remark
varchar(1048576) NULL,
weight
varchar(1048576) NULL,
block_reason
varchar(1048576) NULL,
logistics_type
varchar(1048576) NULL,
logistics_code
varchar(1048576) NULL,
logistics_name
varchar(1048576) NULL,
shop_id
varchar(1048576) NULL,
warehouse_id
varchar(1048576) NULL,
logistics_id
varchar(1048576) NULL,
bad_reason
varchar(1048576) NULL,
receiver_dtb
varchar(1048576) NULL,
refund_status
varchar(1048576) NULL,
trade_type
varchar(1048576) NULL,
picker_name
varchar(1048576) NULL,
examiner_name
varchar(1048576) NULL,
consigner_name
varchar(1048576) NULL,
printer_name
varchar(1048576) NULL,
packager_name
varchar(1048576) NULL,
trade_status
varchar(1048576) NULL,
trade_no
varchar(1048576) NULL,
src_trade_no
varchar(1048576) NULL,
customer_no
varchar(1048576) NULL,
trade_time
varchar(1048576) NULL,
pay_time
varchar(1048576) NULL,
flag_name
varchar(1048576) NULL,
post_amount
varchar(1048576) NULL,
id_card_type
varchar(1048576) NULL,
shop_name
varchar(1048576) NULL,
shop_no
varchar(1048576) NULL,
shop_remark
varchar(1048576) NULL,
status
varchar(1048576) NULL,
invoice_type
varchar(1048576) NULL,
invoice_id
varchar(1048576) NULL,
cod_amount
varchar(1048576) NULL,
delivery_term
varchar(1048576) NULL,
platform_id
varchar(1048576) NULL,
trade_id
varchar(1048576) NULL,
discount
varchar(1048576) NULL,
tax
varchar(1048576) NULL,
tax_rate
varchar(1048576) NULL,
currency
varchar(1048576) NULL,
created
varchar(1048576) NULL,
stock_check_time
varchar(1048576) NULL,
print_remark
varchar(1048576) NULL,
buyer_message
varchar(1048576) NULL,
cs_remark
varchar(1048576) NULL,
invoice_title
varchar(1048576) NULL,
invoice_content
varchar(1048576) NULL,
post_fee
varchar(1048576) NULL,
package_fee
varchar(1048576) NULL,
receivable
varchar(1048576) NULL,
goods_total_cost
varchar(1048576) NULL,
goods_total_amount
varchar(1048576) NULL,
modified
varchar(1048576) NULL,
fenxiao_nick
varchar(1048576) NULL,
trade_label
varchar(1048576) NULL,
trade_from
varchar(1048576) NULL,
picklist_no
varchar(1048576) NULL,
picklist_seq
varchar(1048576) NULL,
logistics_print_status
varchar(1048576) NULL,
paid
varchar(1048576) NULL,
shop_platform_id
varchar(1048576) NULL,
sub_platform_id
varchar(1048576) NULL,
error_info
varchar(1048576) NULL,
custom_type
varchar(1048576) NULL,
sendbill_template_id
varchar(1048576) NULL,
customer_id
varchar(1048576) NULL,
warehouse_type
varchar(1048576) NULL,
operator_id
varchar(1048576) NULL,
outer_no
varchar(1048576) NULL,
consign_status
varchar(1048576) NULL,
goods_type_count
varchar(1048576) NULL,
calc_post_cost
varchar(1048576) NULL,
batch_no
varchar(1048576) NULL,
created_date
varchar(1048576) NULL,
logistics_list
varchar(1048576) NULL,
details_list
varchar(1048576) NULL,
seq_no
varchar(1048576) NULL,
src_order_id
varchar(1048576) NULL,
warehouse_mapping_code
varchar(1048576) NULL,
origin_data
varchar(1048576) NULL,
yuce_cube_shop_id
varchar(1048576) NULL
) ENGINE=OLAP
PRIMARY KEY(dt
, __id
)
PARTITION BY date_trunc(‘day’, dt)
DISTRIBUTED BY HASH(dt
, __id
)
PROPERTIES (
“compression” = “LZ4”,
“enable_persistent_index” = “true”,
“fast_schema_evolution” = “true”,
“replicated_storage” = “true”,
“replication_num” = “1”
);