美文网首页
2022-12-22数据倾斜问题排查

2022-12-22数据倾斜问题排查

作者: felix_feng | 来源:发表于2022-12-29 10:20 被阅读0次

explain分析
Explain
select order_channel_code
,order_date
,rpt_date
,count(seller_id) as warn_customer_three_num
from (select order_channel_code
-> ,order_date
-> ,region_code
-> ,material_org_code
-> ,seller_id
-> ,rpt_date
-> from ytrpt.mf_customer_delivery_monitor_org_detail
-> where lx_warning>=3
-> group by order_channel_code,order_date,region_code,material_org_code,seller_id,rpt_date
-> ) as b2
-> group by order_channel_code
-> ,order_date
-> ,rpt_date;

image.png image.png

该参数开启的是session变量,若想开启全局变量可以set global is_report_success=true;一般不建议全局开启,会略微影响查询性能

mysql> set is_report_success=true;

相关文章

网友评论

      本文标题:2022-12-22数据倾斜问题排查

      本文链接:https://www.haomeiwen.com/subject/uejmqdtx.html