最新要闻
- 铖昌科技:7月31日融券净卖出7022股,连续3日累计净卖出1.16万股
- 企业微信服务商尘锋重磅上线抖音AI机器人套电,赋能企业高效获客
- 8月1日东明石化油品报价上涨
- 北京暴雨已致11人遇难 其中2人因公殉职
- 敬佩!60岁倪夏莲女单夺冠创造世界纪录,直言自己真的没想到!
- 河化股份:南松医药目前主要业务是生产、研发医药中间体产品 目前暂未涉及终端成品药
- 组图|45公里巡堤!1500余武警官兵彻夜守护永定河
- 2023陕西宝鸡市陈仓区特岗教师招聘面试公告
- 香港青年谈“北上”:赴内地发展恰逢其时
- 大变样!湖人2023-24赛季全新阵容一览
- 三部总票房90亿才回本!《封神》第一部票房破12亿 第二部妲己造型曝光
- 已无力跟中国企业竞争 日本电子巨头松下解散LCD业务:转战汽车电子
- 李杰上手一加Ace 2 Pro:性能巅峰 下一个现象级爆款
- 问界首款MPV卖百万!华为技术、江淮制造
- 茂名母子自驾日产骐达意图穿越罗布泊无人区:差点被困!
- 综合治理水平不高、“双控”力度不足……江苏生态环境保护督察组向徐常盐泰反馈督察情况
手机

外媒:共和党总统候选人称若当选将终止中国最惠国待遇,限制中美经贸联系

水利部太湖流域管理局滚动会商研判 进一步安排部署台风防御工作
- 外媒:共和党总统候选人称若当选将终止中国最惠国待遇,限制中美经贸联系
- 水利部太湖流域管理局滚动会商研判 进一步安排部署台风防御工作
- 今年第6号台风“卡努”升级为超强台风 东海海域海况恶劣
- 凝聚青春力量 助力山区教育 深圳大学积极推动河源教育高质量发展
- 潢川:做好养殖培训 夯实振兴致富路
- 具俊晔拒让大s出门见好友 透露一般晚上才和大S去吃饭
家电
数仓性能优化:倾斜优化-表达式计算倾斜的hint优化
本文分享自华为云社区《GaussDB(DWS)性能调优:倾斜优化-表达式计算倾斜的hint优化》,作者: 譡里个檔 。
(资料图片)
1.原始SQL
SELECTTMP4.TAX_AMT,CATE.L1_PUR_ITEM_CATG_CN_NAME || "-" ||CATE.L2_PUR_ITEM_CATG_CN_NAME || "-" ||CATE.L3_PUR_ITEM_CATG_CN_NAME AS PRODUCT_CATEGORY,MATE.ITEM_CODE AS PRODUCT_CODE,INVEN.INVENTORY_ORG_NAME,TMP4.INVOICE_WITHHOLDING_TAX_GROUP,TMP4.PAYMENT_WITHHOLDING_TAX_GROUP,TMP4.PO_CHARGE_ACCOUNT_CODE,TMP4.CFS_INVOICE_NUMBER,APR.TAX_INVOICE_DATEFROM DWLTAX.DWL_TAX_TAXDP_ERP_AP_INVOICE_TMP5 TMP4,DWRDIM_DW1.DWR_DIM_PUR_ITEM_CATEGORY_D CATE,DWRDIM_DW1.DWR_DIM_MATERIAL_CODE_D MATE,DWRDIM_DW1.DWR_DIM_INVENTORY_ORG_D INVEN,DWTAXDI.DWI_AP_INVOICE_I AP,DWTAXDI.DWI_AP_INVOICE_REGSTN_I APRWHERE 1 = 1AND TMP4.ITEM_CATEGORY_KEY = CATE.PUR_ITEM_CATG_KEY(+)AND CATE.DEL_FLAG(+) = "N"AND TMP4.ITEM_ID = MATE.ITEM_ID(+)AND MATE.DEL_FLAG(+) = "N"AND TMP4.PO_SHIPMENT_TARGET_INV_ORG_KEY = INVEN.INVENTORY_ORG_KEY(+)AND INVEN.DEL_FLAG(+) = "N"AND TMP4.AP_INVOICE_ID = AP.AP_INVOICE_ID(+)AND 6600 || AP.ATTRIBUTE1 = TO_CHAR(APR.AP_INVOICE_REGSTN_ID(+))
执行performance,查询具体执行情况和SQL自诊断信息(详细见附件case-step1-原始执行信息.txt)
id | operation | A-time | A-rows | E-rows | E-distinct | Peak Memory | E-memory | A-width | E-width | E-costs----+------------------------------------------------------------------------------------------------------+------------------------+------------+------------+------------+----------------+----------------+-----------+---------+-------------1 | -> Row Adapter | 69922.773 | 69237018 | 69237018 | | 87KB | | | 573 | 15160857.612 | -> Vector Streaming (type: GATHER) | 65581.989 | 69237018 | 69237018 | | 536KB | | | 573 | 15160857.613 | -> Vector Hash Right Join (4, 6) | [61186.201, 73129.055] | 69237018 | 69237018 | | [306MB, 682MB] | 1113MB(9990MB) | | 573 | 15159431.834 | -> Vector Streaming(type: BROADCAST ng: LC_DL1->LC_DW1) | [554.217, 21008.078] | 1382000544 | 1381572384 | 282184 | [4MB, 4MB] | 3MB | | 16 | 7056095.885 | -> CStore Scan on dwifin.dwi_ap_invoice_regstn s | [5.354, 11.617] | 28791678 | 28782758 | | [1MB, 1MB] | 1MB | | 16 | 28004.186 | -> Vector Hash Left Join (7, 19) | [1728.008, 2017.488] | 69237018 | 69237018 | 79721 | [834KB, 834KB] | 16MB | [229,252] | 578 | 1832322.907 | -> Vector Hash Left Join (8, 17) | [1428.799, 1925.653] | 69237018 | 69237018 | 179 | [32MB, 32MB] | 28MB(8901MB) | | 576 | 1817105.078 | -> Vector Streaming(type: PART REDISTRIBUTE PART ROUNDROBIN) | [996.780, 1635.826] | 69237018 | 69237018 | 4167 | [1MB, 1MB] | 2MB | | 570 | 1788113.859 | -> Vector Hash Left Join (10, 14) | [1086.903, 1780.641] | 69237018 | 69237018 | | [173MB, 174MB] | 227MB(9067MB) | | 570 | 1304897.1210 | -> Vector Streaming(type: PART REDISTRIBUTE PART ROUNDROBIN) | [153.628, 891.680] | 69237018 | 69237018 | 20271 | [1MB, 1MB] | 2MB | | 567 | 847160.1611 | -> Vector Hash Left Join (12, 13) | [367.155, 465.821] | 69237018 | 69237018 | | [30MB, 30MB] | 22MB(8896MB) | | 567 | 363943.4312 | -> CStore Scan on dwltax.dwl_tax_taxdp_erp_ap_invoice_tmp5 tmp4 | [150.676, 178.827] | 69237018 | 69237018 | 526 | [4MB, 4MB] | 1MB | | 553 | 340168.4413 | -> CStore Scan on dwrdim_dw1.dwr_dim_pur_item_category_d cate | [14.549, 24.399] | 8228448 | 8228448 | 171426 | [2MB, 2MB] | 1MB | [104,104] | 26 | 9056.9914 | -> Vector Streaming(type: PART REDISTRIBUTE PART BROADCAST ng: LC_DL1->LC_DW1) | [315.926, 339.782] | 117191217 | 117191170 | 2441483 | [1MB, 1MB] | 3MB | [47,47] | 22 | 406136.1015 | -> Vector Partition Iterator | [118.307, 151.248] | 117191170 | 117191170 | | [41KB, 41KB] | 1MB | | 22 | 300641.9316 | -> Partitioned CStore Scan on dwifin.dwi_ap_invoice s | [86.557, 111.947] | 117191170 | 117191170 | | [6MB, 6MB] | 1MB | | 22 | 300641.9317 | -> Vector Streaming(type: PART LOCAL PART BROADCAST) | [60.429, 99.381] | 15442613 | 15442566 | 321720 | [584KB, 584KB] | 2MB | [58,58] | 19 | 49578.1918 | -> CStore Scan on dwrdim_dw1.dwr_dim_material_code_d mate | [19.779, 33.206] | 15442566 | 15442566 | | [1MB, 2MB] | 1MB | | 19 | 35704.0219 | -> CStore Scan on dwrdim_dw1.dwr_dim_inventory_org_d inven | [0.383, 0.739] | 135072 | 135072 | 2814 | [1MB, 1MB] | 1MB | [53,53] | 14 | 2823.85SQL Diagnostic Information--------------------------------------------------------------------------------------------Execute diagnostic informationPlanNode[4] Large Table in Broadcast "Vector Streaming(type: BROADCAST ng: LC_DL1->LC_DW1)"Predicate Information (identified by plan id)------------------------------------------------------------------------------------------------------------------------------3 --Vector Hash Right Join (4, 6)Hash Cond: (((numeric_out(s.ap_invoice_regstn_id))::character varying)::text = ("6600"::text || (s.attribute1)::text))6 --Vector Hash Left Join (7, 19)Hash Cond: (tmp4.po_shipment_target_inv_org_key = inven.inventory_org_key)7 --Vector Hash Left Join (8, 17)Hash Cond: (tmp4.item_id = mate.item_id)Skew Join Optimized by Statistic8 --Vector Streaming(type: PART REDISTRIBUTE PART ROUNDROBIN)Skew Filter(type: ROUNDROBIN): ((tmp4.item_id = (-999999)::numeric) OR (tmp4.item_id IS NULL))9 --Vector Hash Left Join (10, 14)Hash Cond: (tmp4.ap_invoice_id = s.ap_invoice_id)Skew Join Optimized by Statistic10 --Vector Streaming(type: PART REDISTRIBUTE PART ROUNDROBIN)Skew Filter(type: ROUNDROBIN): (tmp4.ap_invoice_id = 1001113812002::numeric)11 --Vector Hash Left Join (12, 13)Hash Cond: (tmp4.item_category_key = cate.pur_item_catg_key)13 --CStore Scan on dwrdim_dw1.dwr_dim_pur_item_category_d cateFilter: ((cate.del_flag)::text = "N"::text)Pushdown Predicate Filter: ((cate.del_flag)::text = "N"::text)14 --Vector Streaming(type: PART REDISTRIBUTE PART BROADCAST ng: LC_DL1->LC_DW1)Skew Filter(type: BROADCAST): (s.ap_invoice_id = 1001113812002::numeric)15 --Vector Partition IteratorIterations: 14716 --Partitioned CStore Scan on dwifin.dwi_ap_invoice sPartitions Selected by Static Prune: 1..14717 --Vector Streaming(type: PART LOCAL PART BROADCAST)Skew Filter(type: BROADCAST): (mate.item_id = (-999999)::numeric)18 --CStore Scan on dwrdim_dw1.dwr_dim_material_code_d mateFilter: ((mate.del_flag)::text = "N"::text)Pushdown Predicate Filter: ((mate.del_flag)::text = "N"::text)19 --CStore Scan on dwrdim_dw1.dwr_dim_inventory_org_d invenFilter: ((inven.del_flag)::text = "N"::text)Pushdown Predicate Filter: ((inven.del_flag)::text = "N"::text)
2.禁止大表广播
如上小节显示确实是id=4的这一步是一个大的结果集(2879w条)做了broadcast,并且紧接着的id=5的HashJoin耗时很长。因此通过增加hint方式禁止dwifin.dwi_ap_invoice_regstn走广播。分析发现表dwifin.dwi_ap_invoice_regstn是视图apr展开出现的,因此增加如下hint信息,其中
1. no merge (apr)是防止视图apr中的语句提升,导致的hint信息失效
2. no broadcast(apr)表示禁止apr走broadcast
EXPLAIN performanceSELECT /*+ no merge (apr) no broadcast(apr) */TMP4.TAX_AMT,CATE.L1_PUR_ITEM_CATG_CN_NAME || "-" ||CATE.L2_PUR_ITEM_CATG_CN_NAME || "-" ||CATE.L3_PUR_ITEM_CATG_CN_NAME AS PRODUCT_CATEGORY,MATE.ITEM_CODE AS PRODUCT_CODE,INVEN.INVENTORY_ORG_NAME,TMP4.INVOICE_WITHHOLDING_TAX_GROUP,TMP4.PAYMENT_WITHHOLDING_TAX_GROUP,TMP4.PO_CHARGE_ACCOUNT_CODE,TMP4.CFS_INVOICE_NUMBER,APR.TAX_INVOICE_DATEFROM DWLTAX.DWL_TAX_TAXDP_ERP_AP_INVOICE_TMP5 TMP4,DWRDIM_DW1.DWR_DIM_PUR_ITEM_CATEGORY_D CATE,DWRDIM_DW1.DWR_DIM_MATERIAL_CODE_D MATE,DWRDIM_DW1.DWR_DIM_INVENTORY_ORG_D INVEN,DWTAXDI.DWI_AP_INVOICE_I AP,DWTAXDI.DWI_AP_INVOICE_REGSTN_I APRWHERE 1 = 1AND TMP4.ITEM_CATEGORY_KEY = CATE.PUR_ITEM_CATG_KEY(+)AND CATE.DEL_FLAG(+) = "N"AND TMP4.ITEM_ID = MATE.ITEM_ID(+)AND MATE.DEL_FLAG(+) = "N"AND TMP4.PO_SHIPMENT_TARGET_INV_ORG_KEY = INVEN.INVENTORY_ORG_KEY(+)AND INVEN.DEL_FLAG(+) = "N"AND TMP4.AP_INVOICE_ID = AP.AP_INVOICE_ID(+)AND 6600 || AP.ATTRIBUTE1 = TO_CHAR(APR.AP_INVOICE_REGSTN_ID(+))
获取如上语句的performance信息(详细见附件 case-step2-禁止大表广播.txt)
id | operation | A-time | A-rows | E-rows | E-distinct | Peak Memory | E-memory | A-width | E-width | E-costs----+---------------------------------------------------------------------------------------------------------+------------------------+-----------+-----------+------------+----------------+----------------+-----------+---------+-------------1 | -> Row Adapter | 15685.781 | 69237018 | 69237018 | | 87KB | | | 573 | 33341721.222 | -> Vector Streaming (type: GATHER) | 11361.740 | 69237018 | 69237018 | | 536KB | | | 573 | 33341721.223 | -> Vector Hash Left Join (4, 19) | [15269.267, 18985.791] | 69237018 | 69237018 | | [74MB, 74MB] | 101MB(9984MB) | | 573 | 33340295.434 | -> Vector Streaming(type: REDISTRIBUTE) | [4743.867, 18632.182] | 69237018 | 69237018 | 79721 | [1MB, 2MB] | 2MB | | 578 | 29821930.765 | -> Vector Hash Left Join (6, 18) | [1473.990, 15359.055] | 69237018 | 69237018 | | [866KB, 898KB] | 16MB | | 578 | 1832322.906 | -> Vector Hash Left Join (7, 16) | [1130.814, 15223.646] | 69237018 | 69237018 | 179 | [32MB, 32MB] | 28MB(9923MB) | | 576 | 1817105.077 | -> Vector Streaming(type: PART REDISTRIBUTE PART ROUNDROBIN) | [681.709, 14909.424] | 69237018 | 69237018 | 4167 | [1MB, 1MB] | 2MB | | 570 | 1788113.858 | -> Vector Hash Left Join (9, 13) | [1049.201, 12602.796] | 69237018 | 69237018 | | [173MB, 174MB] | 227MB(10089MB) | | 570 | 1304897.129 | -> Vector Streaming(type: PART REDISTRIBUTE PART ROUNDROBIN) | [128.704, 11737.099] | 69237018 | 69237018 | 20271 | [1MB, 1MB] | 2MB | | 567 | 847160.1610 | -> Vector Hash Left Join (11, 12) | [368.537, 443.623] | 69237018 | 69237018 | | [30MB, 30MB] | 22MB(9918MB) | | 567 | 363943.4311 | -> CStore Scan on dwltax.dwl_tax_taxdp_erp_ap_invoice_tmp5 tmp4 | [148.366, 175.347] | 69237018 | 69237018 | 526 | [4MB, 4MB] | 1MB | | 553 | 340168.4412 | -> CStore Scan on dwrdim_dw1.dwr_dim_pur_item_category_d cate | [13.319, 24.442] | 8228448 | 8228448 | 171426 | [2MB, 2MB] | 1MB | [104,104] | 26 | 9056.9913 | -> Vector Streaming(type: PART REDISTRIBUTE PART BROADCAST ng: LC_DL1->LC_DW1) | [242.053, 294.233] | 117191217 | 117191170 | 2441483 | [1MB, 1MB] | 3MB | [47,47] | 22 | 406136.1014 | -> Vector Partition Iterator | [118.124, 154.954] | 117191170 | 117191170 | | [41KB, 41KB] | 1MB | | 22 | 300641.9315 | -> Partitioned CStore Scan on dwifin.dwi_ap_invoice s | [86.942, 105.441] | 117191170 | 117191170 | | [6MB, 6MB] | 1MB | | 22 | 300641.9316 | -> Vector Streaming(type: PART LOCAL PART BROADCAST) | [83.793, 117.853] | 15442613 | 15442566 | 321720 | [584KB, 584KB] | 2MB | [58,58] | 19 | 49578.1917 | -> CStore Scan on dwrdim_dw1.dwr_dim_material_code_d mate | [21.898, 35.895] | 15442566 | 15442566 | | [1MB, 2MB] | 1MB | | 19 | 35704.0218 | -> CStore Scan on dwrdim_dw1.dwr_dim_inventory_org_d inven | [0.389, 0.661] | 135072 | 135072 | 2814 | [1MB, 1MB] | 1MB | [53,53] | 14 | 2823.8519 | -> Vector Streaming(type: REDISTRIBUTE ng: LC_DL1->LC_DW1) | [30.667, 49.474] | 28791678 | 28782758 | 599641 | [2MB, 2MB] | 3MB | [75,75] | 16 | 56030.4920 | -> Vector Subquery Scan on apr | [42.087, 61.734] | 28791678 | 28782758 | | [376KB, 376KB] | 1MB | | 16 | 30826.0221 | -> CStore Scan on dwifin.dwi_ap_invoice_regstn s | [5.177, 8.049] | 28791678 | 28782758 | | [1MB, 1MB] | 1MB | | 16 | 28004.18SQL Diagnostic Information----------------------------------------------------------------------------------------------------------Execute diagnostic informationPlanNode[4] DataSkew:"Vector Streaming(type: REDISTRIBUTE)", min_dn_tuples:257082, max_dn_tuples:47206637Predicate Information (identified by plan id)----------------------------------------------------------------------------------------------------------------------------------3 --Vector Hash Left Join (4, 19)Hash Cond: ((("6600"::text || (s.attribute1)::text)) = ((numeric_out(apr.ap_invoice_regstn_id))::character varying)::text)5 --Vector Hash Left Join (6, 18)Hash Cond: (tmp4.po_shipment_target_inv_org_key = inven.inventory_org_key)6 --Vector Hash Left Join (7, 16)Hash Cond: (tmp4.item_id = mate.item_id)Skew Join Optimized by Statistic7 --Vector Streaming(type: PART REDISTRIBUTE PART ROUNDROBIN)Skew Filter(type: ROUNDROBIN): ((tmp4.item_id = (-999999)::numeric) OR (tmp4.item_id IS NULL))8 --Vector Hash Left Join (9, 13)Hash Cond: (tmp4.ap_invoice_id = s.ap_invoice_id)Skew Join Optimized by Statistic9 --Vector Streaming(type: PART REDISTRIBUTE PART ROUNDROBIN)Skew Filter(type: ROUNDROBIN): (tmp4.ap_invoice_id = 1001113812002::numeric)10 --Vector Hash Left Join (11, 12)Hash Cond: (tmp4.item_category_key = cate.pur_item_catg_key)12 --CStore Scan on dwrdim_dw1.dwr_dim_pur_item_category_d cateFilter: ((cate.del_flag)::text = "N"::text)Pushdown Predicate Filter: ((cate.del_flag)::text = "N"::text)13 --Vector Streaming(type: PART REDISTRIBUTE PART BROADCAST ng: LC_DL1->LC_DW1)Skew Filter(type: BROADCAST): (s.ap_invoice_id = 1001113812002::numeric)14 --Vector Partition IteratorIterations: 14715 --Partitioned CStore Scan on dwifin.dwi_ap_invoice sPartitions Selected by Static Prune: 1..14716 --Vector Streaming(type: PART LOCAL PART BROADCAST)Skew Filter(type: BROADCAST): (mate.item_id = (-999999)::numeric)17 --CStore Scan on dwrdim_dw1.dwr_dim_material_code_d mateFilter: ((mate.del_flag)::text = "N"::text)Pushdown Predicate Filter: ((mate.del_flag)::text = "N"::text)18 --CStore Scan on dwrdim_dw1.dwr_dim_inventory_org_d invenFilter: ((inven.del_flag)::text = "N"::text)Pushdown Predicate Filter: ((inven.del_flag)::text = "N"::text)
3.表达式倾斜的hint
发现自诊断信息中倾斜告警
而Plan ID为4的算子是
其中是s是视图dwtaxdi.dwi_ap_invoice_i展开后的表dwifin.dwi_ap_invoice,查询此表的列attribute1的统计信息如下,发现在NULL值上存在严重倾斜
因为重分布列是一个表达式6600 || AP.ATTRIBUTE1,当前DWS的倾斜的hint不支持表达式,因为我们做如下变通实现表达式的值倾斜的hint
SELECT /*+ no merge (apr) no broadcast(apr) no merge(ap) skew(ap (attr1) ("6600")) */TMP4.TAX_AMT,CATE.L1_PUR_ITEM_CATG_CN_NAME || "-" ||CATE.L2_PUR_ITEM_CATG_CN_NAME || "-" ||CATE.L3_PUR_ITEM_CATG_CN_NAME AS PRODUCT_CATEGORY,MATE.ITEM_CODE AS PRODUCT_CODE,INVEN.INVENTORY_ORG_NAME,TMP4.INVOICE_WITHHOLDING_TAX_GROUP,TMP4.PAYMENT_WITHHOLDING_TAX_GROUP,TMP4.PO_CHARGE_ACCOUNT_CODE,TMP4.CFS_INVOICE_NUMBER,APR.TAX_INVOICE_DATEFROM DWLTAX.DWL_TAX_TAXDP_ERP_AP_INVOICE_TMP5 TMP4,DWRDIM_DW1.DWR_DIM_PUR_ITEM_CATEGORY_D CATE,DWRDIM_DW1.DWR_DIM_MATERIAL_CODE_D MATE,DWRDIM_DW1.DWR_DIM_INVENTORY_ORG_D INVEN,(SELECT *, 6600 || AP.ATTRIBUTE1 AS ATTR1 FROM DWTAXDI.DWI_AP_INVOICE_I AP) AP,DWTAXDI.DWI_AP_INVOICE_REGSTN_I APRWHERE 1 = 1AND TMP4.ITEM_CATEGORY_KEY = CATE.PUR_ITEM_CATG_KEY(+)AND CATE.DEL_FLAG(+) = "N"AND TMP4.ITEM_ID = MATE.ITEM_ID(+)AND MATE.DEL_FLAG(+) = "N"AND TMP4.PO_SHIPMENT_TARGET_INV_ORG_KEY = INVEN.INVENTORY_ORG_KEY(+)AND INVEN.DEL_FLAG(+) = "N"AND TMP4.AP_INVOICE_ID = AP.AP_INVOICE_ID(+)AND ATTR1 = TO_CHAR(APR.AP_INVOICE_REGSTN_ID(+))
其中构建了子查询 AP
SELECT *, 6600 || AP.ATTRIBUTE1 AS ATTR1 FROM DWTAXDI.DWI_AP_INVOICE_I AP
在把原始的关联列表达式放到子查询里面,然后把 6600 || AP.ATTRIBUTE1 命名为attr1。
在父查询中首先禁止AP这个子查询提升。然后在父查询中通过hint 子查询AP这个结果集的列attr1存在倾斜值"6600" 。这个倾斜值是计算出来的(NULL || 6600 = ‘6600’),并且在原始关联计算中关联表达式是如下,即 6600 || AP.ATTRIBUTE1的结果被转换为text类型(字符串类型)
获取新的语句的performance如下(详细见附件 case-step3-倾斜优化.txt)
id | operation | A-time | A-rows | E-rows | E-distinct | Peak Memory | E-memory | A-width | E-width | E-costs----+------------------------------------------------------------------------------------------------------+-----------------------+-----------+-----------+------------+----------------+----------------+-----------+---------+------------1 | -> Row Adapter | 9045.793 | 69237018 | 69237018 | | 87KB | | | 573 | 2040755.712 | -> Vector Streaming (type: GATHER) | 4842.656 | 69237018 | 69237018 | | 520KB | | | 573 | 2040755.713 | -> Vector Hash Left Join (4, 21) | [2673.707, 11389.688] | 69237018 | 69237018 | | [1MB, 1MB] | 16MB | | 573 | 2039329.924 | -> Vector Hash Left Join (5, 19) | [1951.482, 10931.220] | 69237018 | 69237018 | 179 | [32MB, 32MB] | 28MB(10018MB) | | 571 | 2009687.715 | -> Vector Streaming(type: PART REDISTRIBUTE PART ROUNDROBIN) | [1541.777, 10591.702] | 69237018 | 69237018 | 4167 | [1MB, 1MB] | 2MB | | 565 | 1980696.496 | -> Vector Hash Left Join (7, 18) | [1703.438, 1980.655] | 69237018 | 69237018 | | [30MB, 30MB] | 22MB(10010MB) | | 565 | 1497479.767 | -> Vector Hash Left Join (8, 10) | [1523.277, 1708.622] | 69237018 | 69237018 | 526 | [165MB, 166MB] | 191MB(10151MB) | | 551 | 1473704.778 | -> Vector Streaming(type: PART REDISTRIBUTE PART ROUNDROBIN) | [94.501, 203.619] | 69237018 | 69237018 | 20271 | [1MB, 1MB] | 2MB | | 553 | 823385.179 | -> CStore Scan on dwltax.dwl_tax_taxdp_erp_ap_invoice_tmp5 tmp4 | [142.734, 171.486] | 69237018 | 69237018 | | [4MB, 4MB] | 1MB | | 553 | 340168.4410 | -> Vector Streaming(type: PART REDISTRIBUTE PART BROADCAST ng: LC_DL1->LC_DW1) | [811.192, 853.583] | 117191217 | 117191170 | 2441483 | [2MB, 2MB] | 3MB | [44,44] | 17 | 598718.7411 | -> Vector Hash Left Join (12, 15) | [340.998, 790.399] | 117191170 | 117191170 | | [39MB, 39MB] | 27MB(10015MB) | | 17 | 493224.5712 | -> Vector Streaming(type: PART REDISTRIBUTE PART ROUNDROBIN) | [53.170, 79.836] | 117191170 | 117191170 | 79721 | [2MB, 2MB] | 3MB | | 41 | 412662.9013 | -> Vector Partition Iterator | [145.450, 171.527] | 117191170 | 117191170 | | [41KB, 41KB] | 1MB | | 22 | 303514.2714 | -> Partitioned CStore Scan on dwifin.dwi_ap_invoice s | [112.099, 134.193] | 117191170 | 117191170 | | [6MB, 6MB] | 1MB | | 22 | 300641.9315 | -> Vector Streaming(type: PART REDISTRIBUTE PART BROADCAST) | [48.632, 99.230] | 28791678 | 28782758 | 282184 | [2MB, 2MB] | 3MB | [75,75] | 16 | 56928.0416 | -> Vector Subquery Scan on apr | [41.916, 78.189] | 28791678 | 28782758 | | [376KB, 376KB] | 1MB | | 16 | 30826.0217 | -> CStore Scan on dwifin.dwi_ap_invoice_regstn s | [5.233, 10.667] | 28791678 | 28782758 | | [1MB, 1MB] | 1MB | | 16 | 28004.1818 | -> CStore Scan on dwrdim_dw1.dwr_dim_pur_item_category_d cate | [12.065, 20.667] | 8228448 | 8228448 | 171426 | [2MB, 2MB] | 1MB | [104,104] | 26 | 9056.9919 | -> Vector Streaming(type: PART LOCAL PART BROADCAST) | [67.272, 97.378] | 15442613 | 15442566 | 321720 | [584KB, 584KB] | 2MB | [58,58] | 19 | 49578.1920 | -> CStore Scan on dwrdim_dw1.dwr_dim_material_code_d mate | [18.605, 31.713] | 15442566 | 15442566 | | [1MB, 2MB] | 1MB | | 19 | 35704.0221 | -> CStore Scan on dwrdim_dw1.dwr_dim_inventory_org_d inven | [0.378, 0.647] | 135072 | 135072 | 2814 | [1MB, 1MB] | 1MB | [53,53] | 14 | 2823.85Predicate Information (identified by plan id)----------------------------------------------------------------------------------------------------------------------------------3 --Vector Hash Left Join (4, 21)Hash Cond: (tmp4.po_shipment_target_inv_org_key = inven.inventory_org_key)4 --Vector Hash Left Join (5, 19)Hash Cond: (tmp4.item_id = mate.item_id)Skew Join Optimized by Statistic5 --Vector Streaming(type: PART REDISTRIBUTE PART ROUNDROBIN)Skew Filter(type: ROUNDROBIN): ((tmp4.item_id = (-999999)::numeric) OR (tmp4.item_id IS NULL))6 --Vector Hash Left Join (7, 18)Hash Cond: (tmp4.item_category_key = cate.pur_item_catg_key)7 --Vector Hash Left Join (8, 10)Hash Cond: (tmp4.ap_invoice_id = s.ap_invoice_id)Skew Join Optimized by Statistic8 --Vector Streaming(type: PART REDISTRIBUTE PART ROUNDROBIN)Skew Filter(type: ROUNDROBIN): (tmp4.ap_invoice_id = 1001113812002::numeric)10 --Vector Streaming(type: PART REDISTRIBUTE PART BROADCAST ng: LC_DL1->LC_DW1)Skew Filter(type: BROADCAST): (s.ap_invoice_id = 1001113812002::numeric)11 --Vector Hash Left Join (12, 15)Hash Cond: ((("6600"::text || (s.attribute1)::text)) = ((numeric_out(apr.ap_invoice_regstn_id))::character varying)::text)Skew Join Optimized by Hint12 --Vector Streaming(type: PART REDISTRIBUTE PART ROUNDROBIN)Skew Filter(type: ROUNDROBIN): ((("6600"::text || (s.attribute1)::text)) = "6600"::text)13 --Vector Partition IteratorIterations: 14714 --Partitioned CStore Scan on dwifin.dwi_ap_invoice sPartitions Selected by Static Prune: 1..14715 --Vector Streaming(type: PART REDISTRIBUTE PART BROADCAST)Skew Filter(type: BROADCAST): ((((numeric_out(apr.ap_invoice_regstn_id))::character varying)::text) = "6600"::text)18 --CStore Scan on dwrdim_dw1.dwr_dim_pur_item_category_d cateFilter: ((cate.del_flag)::text = "N"::text)Pushdown Predicate Filter: ((cate.del_flag)::text = "N"::text)19 --Vector Streaming(type: PART LOCAL PART BROADCAST)Skew Filter(type: BROADCAST): (mate.item_id = (-999999)::numeric)20 --CStore Scan on dwrdim_dw1.dwr_dim_material_code_d mateFilter: ((mate.del_flag)::text = "N"::text)Pushdown Predicate Filter: ((mate.del_flag)::text = "N"::text)21 --CStore Scan on dwrdim_dw1.dwr_dim_inventory_org_d invenFilter: ((inven.del_flag)::text = "N"::text)Pushdown Predicate Filter: ((inven.del_flag)::text = "N"::text)
- 附件:case-step1-原始执行信息.txt0B
- 附件:case-step3-倾斜优化.txt862.61KB
- 附件:case-step2-禁止大表广播.txt0B
点击关注,第一时间了解华为云新鲜技术~
关键词:
-
-
-
-
数仓性能优化:倾斜优化-表达式计算倾斜的hint优化
线上服务器磁盘爆了,如何快速处理?
Qt调用动态库的三种方式(linux)
探索智“惠”民生服务新场景
广东举办“个体工商户服务月”线下活动
官方辟谣《罗刹海市》全球网络播放量破世界纪录:没收到申请,没破吉尼斯纪录
云顶新耀宣布完成耐赋康在中国开放标签扩展研究中的患者招募
外媒:共和党总统候选人称若当选将终止中国最惠国待遇,限制中美经贸联系
2023年立冬贵人运旺盛的四大星座 高人指点
达安基因2023上半年扣非净利下滑96.98%,曾半年状告四家第三方医学检测室
蓄滞洪区、泛区启用!组织撤离!暂停发车!河北多地最新通知
行业风向标丨通信产业运行良好,价值重估进入新阶段
录像机什么时候发明的(数码相机什么时候开始有?)
天津武清安置点情况如何
江西省新余市市场监管局多措并举推动高质量发展
哈萨克斯坦官员:成都大运会开幕式和赛事筹备展现中国高水准
京港澳高速路杜家坎至北京市界双向已开通
国有寿险公司有哪几家?如何对比选择?
北向资金净买入超30亿元
《毒液》之后,又一部漫威超级大片来袭,《海王》的对手来了!
《海贼王》海迷最想养的七只宠物,贝波人气最高,青雉的宠物最强
铖昌科技:7月31日融券净卖出7022股,连续3日累计净卖出1.16万股
山西焦煤:7月31日融券净卖出18.87万股,连续3日累计净卖出43.5万股
江西酷里蓝新材料有限公司整装从家居装修到心灵治愈 设计让家更温暖
北斗GPS卫星校时服务器如何在各领域发挥重要作用
水利部太湖流域管理局滚动会商研判 进一步安排部署台风防御工作
广州出台旅游奖励办法:旅行社带客到广州有奖
成都大运会丨排球——中国队胜德国队
天府融媒看大运丨跳水比赛首日女双10米台张家齐/掌敏洁组合夺金 掌敏洁直呼“梦回2018年”
退役老人逛射击馆枪枪10环 网友:退役不褪色,帅
西部材料:截止2023年7月31日,公司总股东户数为31,353户
国家发展改革委部署加大宏观政策调控力度等六方面任务
日本「埃普西隆 S」火箭发动机试验爆炸或因外壳过热
售10.29万元起,捷途X70 PRO正式上市
8月1日人民币兑美元中间价上调22个基点
官方通报公职人员被曝涉不雅聊天:系掐头去尾、剪辑拼凑
今年第6号台风“卡努”升级为超强台风 东海海域海况恶劣
大雨中多发 车牌“流浪记”
五菱缤果7月销量超过20000辆 累计销量突破8万辆
国家能源集团助力青海省高质量发展
【财经分析】京津冀持续强降雨 玻璃期现同涨盘面涨超6%
企业微信服务商尘锋重磅上线抖音AI机器人套电,赋能企业高效获客
8月1日东明石化油品报价上涨
北京暴雨已致11人遇难 其中2人因公殉职
这位大爷从来没演过戏,只是到剧组看热闹的,结果被导演选中
专家:华北强降雨因“列车效应” 极端天气或成新常态
陆风X8和吉姆尼:燃油经济性对比,哪款耗油量更高?
奥福环保(688021):股价成功突破年线压力位-后市看多(涨)(08-01)
敬佩!60岁倪夏莲女单夺冠创造世界纪录,直言自己真的没想到!
李凯尔角色定位出炉:2米06打3号位,防2米21余嘉豪,强吃孙铭徽
滨州滨城:5489项“互联网+政务服务”事项 企业登记全程电子化率达99.5%
联创光电8月1日快速回调
防汛保障力量全部在岗 首都机场今日计划发送旅客14.88万人次
锋评|若无商贩容身处 何来城市三万里
澳大利亚航天局证实海滩神秘物体来源:很可能是印度火箭碎片
停车场的雨夜,他们彻夜守候
凝聚青春力量 助力山区教育 深圳大学积极推动河源教育高质量发展
湖北省公安厅刑侦总队有组织犯罪侦查支队原副支队长、一级警长彭耀接受监察调查
北京全市平均降雨量263.8毫米
潢川:做好养殖培训 夯实振兴致富路
具俊晔拒让大s出门见好友 透露一般晚上才和大S去吃饭
东方环宇: 截至2023年7月31日,公司的股东人数为12474
河化股份:南松医药目前主要业务是生产、研发医药中间体产品 目前暂未涉及终端成品药
民生银行西安胡家庙支行配合公安机关成功堵截可疑资金柜面取现
国内油价下周三迎来“四连涨” 预计上调0.17-0.18元/升
向世界展示中国城市精气神
《抽卡监狱》保释卡有什么用 保释卡作用介绍
国内游戏用户规模达6.68亿 电竞游戏行业市场运行现状及发展指数分析
“卡努”明日将移入东海 海浪警报升级为橙色
六类水晶头做法(六类水晶头的接线方法)
北京房山:全区约6万户停电,今起对道路中断的村空投物资
我媳妇有那个网贷的那个钱,于欣年给人家没有还,今天她带两个小孩回家,在
新岚图FREE今日开启预定 8月19日上市 续航超1200km
突然跳水,券商股砸盘!发生了什么
近乎翻倍!各地公共充电桩充电价格上涨,长沙有何变化?
韩国高温天气持续 两天内至少15人因中暑身亡
组图|45公里巡堤!1500余武警官兵彻夜守护永定河
2023陕西宝鸡市陈仓区特岗教师招聘面试公告
KENZO因牛仔裤不合格被罚6万 KENZO售价近3千裤子不合格被罚
演唱会“现场感”无可替代
暴雪官宣:8月25日,怀旧服玩家迎来重新开始
哈尔滨发布地质灾害气象风险橙色预警
隆基Hi-MO 7组件重磅亮相沙特,高能品质助力"沙特2030愿景"加速实现
“时刻准备着再次为国出征”
8月1日夜到3日白天 延边雨!雨!雨!
同比增长八成 广汽埃安7月销量达4.5万辆
津市牛肉粉的来历(津市牛肉粉)
市监总局约谈四家生猪养殖企业,涉事企业:立即整改
湖北:关于本科普通批第二次征集志愿公告
安卓性能王者!曝三星又拿到了鸡血版骁龙8 Gen3
安全环保还省钱 这款集装箱累计发运已过万箱
GDP增速全省第2!济源上半年经济“成绩单”出炉
建工修复:参展第四届湖南绿博会 助力“三湘大地”绿色低碳循环发展
传统文化与影视创作可以双向赋能
莫斯科一商业大厦被无人机撞击
紫罗兰玉髓会掉色吗
紫罗兰翡翠手镯怎样辨真假
青海料和田玉有青白玉吗
香港青年谈“北上”:赴内地发展恰逢其时
7月31日COMEX黄金库存统计