数仓性能调优:大宽表关联 MERGE 性能优化
- 2023-07-04 广东
本文字数:24396 字
阅读完需:约 80 分钟
本文分享自华为云社区《GaussDB(DWS)性能调优:大宽表关联MERGE性能优化》,作者:譡里个檔。
【业务背景】
如下 MERGE 语句执行耗时长达 2034s
【性能分析】
分析执行计划(如下),发现表 sdifin.hah_ae_line_sr_t_02_8663 和 stgfin.dlt_hah_ae_line_sr_t_02_8663 都是 3+亿数据的大宽表,单字段宽度达到 15K。关联结果集在做 MERGE 操作之前需要做一次重分布,此重分布的数据量也是 3+亿数据,单字段宽度达 30K(基本是表 sdifin.hah_ae_line_sr_t_02_8663 和 stgfin.dlt_hah_ae_line_sr_t_02_8663 字段宽度之和)。
id | operation | E-rows | E-distinct | E-memory | E-width | E-costs
----+------------------------------------------------------------------------------------------------+-----------+------------+----------+---------+--------------
1 | -> Row Adapter | 1 | | | 31469 | 580722324.29
2 | -> Vector Streaming (type: GATHER) | 1 | | | 31469 | 580722324.29
3 | -> Vector Merge on sdifin.hah_ae_line_sr_t_02_8663 event_1u18olr | 409569519 | | 6764MB | 31469 | 580721532.96
4 | -> Vector Streaming(type: REDISTRIBUTE) | 409569519 | | 3MB | 31469 | 580721532.96
5 | -> Vector Hash Left Join (6, 7) | 409569519 | | 3470MB | 31469 | 518861594.48
6 | -> CStore Scan on stgfin.dlt_hah_ae_line_sr_t_02_8663 | 372335926 | 265738 | 1MB | 15428 | 254707.99
7 | -> Vector Partition Iterator | 372335926 | 419316 | 1MB | 15985 | 241364.35
8 | -> Partitioned CStore Scan on sdifin.hah_ae_line_sr_t_02_8663 event_1u18olr | 372335926 | | 1MB | 15985 | 241364.35
Predicate Information (identified by plan id)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
5 --Vector Hash Left Join (6, 7)
Hash Cond: (((dlt_hah_ae_line_sr_t_02_8663.ae_header_id)::text = (event_1u18olr.ae_header_id)::text) AND (dlt_hah_ae_line_sr_t_02_8663.ae_line_num = event_1u18olr.ae_line_num))
7 --Vector Partition Iterator
Iterations: 20
8 --Partitioned CStore Scan on sdifin.hah_ae_line_sr_t_02_8663 event_1u18olr
Partitions Selected by Static Prune: 1..20
Targetlist Information (identified by plan id)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 --Row Adapter
Exec Nodes: (GenGroup) dn_6001_6002, dn_6003_6004, dn_6005_6006, dn_6007_6008, dn_6009_6010, dn_6011_6012, dn_6013_6014, dn_6015_6016, dn_6017_6018, dn_6019_6020, dn_6021_6022, dn_6023_6024, dn_6025_6026, dn_6027_6028, dn_6029_6030, dn_6031_6032, dn_6033_6034, dn_6035_6036, dn_6037_6038, dn_6039_6040, dn_6041_6042, dn_6043_6044, dn_6045_6046, dn_6047_6048, dn_6061_6062, dn_6063_6064, dn_6065_6066, dn_6067_6068, dn_6069_6070, dn_6071_6072, dn_6073_6074, dn_6075_6076, dn_6077_6078, dn_6079_6080, dn_6081_6082, dn_6083_6084, dn_6097_6098, dn_6099_6100, dn_6101_6102, dn_6103_6104, dn_6105_6106, dn_6107_6108, dn_6109_6110, dn_6111_6112, dn_6113_6114, dn_6115_6116, dn_6117_6118, dn_6119_6120, dn_6121_6122, dn_6123_6124, dn_6125_6126, dn_6127_6128, dn_6129_6130, dn_6131_6132, dn_6157_6158, dn_6159_6160, dn_6161_6162, dn_6163_6164, dn_6165_6166, dn_6167_6168, dn_6169_6170, dn_6171_6172, dn_6173_6174, dn_6175_6176, dn_6177_6178, dn_6179_6180, dn_6193_6194, dn_6195_6196, dn_6197_6198, dn_6199_6200, dn_6201_6202, dn_6203_6204, dn_6205_6206, dn_6207_6208, dn_6209_6210, dn_6211_6212, dn_6213_6214, dn_6215_6216, dn_6229_6230, dn_6231_6232, dn_6233_6234, dn_6235_6236, dn_6237_6238, dn_6239_6240, dn_6241_6242, dn_6243_6244, dn_6245_6246, dn_6247_6248, dn_6249_6250, dn_6251_6252, dn_6277_6278, dn_6279_6280, dn_6281_6282, dn_6283_6284, dn_6285_6286, dn_6287_6288, dn_6289_6290, dn_6291_6292, dn_6293_6294, dn_6295_6296, dn_6297_6298, dn_6299_6300
2 --Vector Streaming (type: GATHER)
Node/s: (GenGroup) dn_6001_6002, dn_6003_6004, dn_6005_6006, dn_6007_6008, dn_6009_6010, dn_6011_6012, dn_6013_6014, dn_6015_6016, dn_6017_6018, dn_6019_6020, dn_6021_6022, dn_6023_6024, dn_6025_6026, dn_6027_6028, dn_6029_6030, dn_6031_6032, dn_6033_6034, dn_6035_6036, dn_6037_6038, dn_6039_6040, dn_6041_6042, dn_6043_6044, dn_6045_6046, dn_6047_6048, dn_6061_6062, dn_6063_6064, dn_6065_6066, dn_6067_6068, dn_6069_6070, dn_6071_6072, dn_6073_6074, dn_6075_6076, dn_6077_6078, dn_6079_6080, dn_6081_6082, dn_6083_6084, dn_6097_6098, dn_6099_6100, dn_6101_6102, dn_6103_6104, dn_6105_6106, dn_6107_6108, dn_6109_6110, dn_6111_6112, dn_6113_6114, dn_6115_6116, dn_6117_6118, dn_6119_6120, dn_6121_6122, dn_6123_6124, dn_6125_6126, dn_6127_6128, dn_6129_6130, dn_6131_6132, dn_6157_6158, dn_6159_6160, dn_6161_6162, dn_6163_6164, dn_6165_6166, dn_6167_6168, dn_6169_6170, dn_6171_6172, dn_6173_6174, dn_6175_6176, dn_6177_6178, dn_6179_6180, dn_6193_6194, dn_6195_6196, dn_6197_6198, dn_6199_6200, dn_6201_6202, dn_6203_6204, dn_6205_6206, dn_6207_6208, dn_6209_6210, dn_6211_6212, dn_6213_6214, dn_6215_6216, dn_6229_6230, dn_6231_6232, dn_6233_6234, dn_6235_6236, dn_6237_6238, dn_6239_6240, dn_6241_6242, dn_6243_6244, dn_6245_6246, dn_6247_6248, dn_6249_6250, dn_6251_6252, dn_6277_6278, dn_6279_6280, dn_6281_6282, dn_6283_6284, dn_6285_6286, dn_6287_6288, dn_6289_6290, dn_6291_6292, dn_6293_6294, dn_6295_6296, dn_6297_6298, dn_6299_6300
4 --Vector Streaming(type: REDISTRIBUTE)
Output: dlt_hah_ae_line_sr_t_02_8663.ae_header_id, dlt_hah_ae_line_sr_t_02_8663.ae_line_num, dlt_hah_ae_line_sr_t_02_8663.application_code, dlt_hah_ae_line_sr_t_02_8663.sr1, dlt_hah_ae_line_sr_t_02_8663.sr2, dlt_hah_ae_line_sr_t_02_8663.sr3, dlt_hah_ae_line_sr_t_02_8663.sr4, dlt_hah_ae_line_sr_t_02_8663.sr5, dlt_hah_ae_line_sr_t_02_8663.sr6, dlt_hah_ae_line_sr_t_02_8663.sr7, dlt_hah_ae_line_sr_t_02_8663.sr8, dlt_hah_ae_line_sr_t_02_8663.sr9, dlt_hah_ae_line_sr_t_02_8663.sr10, dlt_hah_ae_line_sr_t_02_8663.sr11, dlt_hah_ae_line_sr_t_02_8663.sr12, dlt_hah_ae_line_sr_t_02_8663.sr13, dlt_hah_ae_line_sr_t_02_8663.sr14, dlt_hah_ae_line_sr_t_02_8663.sr15, dlt_hah_ae_line_sr_t_02_8663.sr16, dlt_hah_ae_line_sr_t_02_8663.sr17, dlt_hah_ae_line_sr_t_02_8663.sr18, dlt_hah_ae_line_sr_t_02_8663.sr19, dlt_hah_ae_line_sr_t_02_8663.sr20, dlt_hah_ae_line_sr_t_02_8663.sr21, dlt_hah_ae_line_sr_t_02_8663.sr22, dlt_hah_ae_line_sr_t_02_8663.sr23, dlt_hah_ae_line_sr_t_02_8663.sr24, dlt_hah_ae_line_sr_t_02_8663.sr25, dlt_hah_ae_line_sr_t_02_8663.sr26, dlt_hah_ae_line_sr_t_02_8663.sr27, dlt_hah_ae_line_sr_t_02_8663.sr28, dlt_hah_ae_line_sr_t_02_8663.sr29, dlt_hah_ae_line_sr_t_02_8663.sr30, dlt_hah_ae_line_sr_t_02_8663.sr31, dlt_hah_ae_line_sr_t_02_8663.sr32, dlt_hah_ae_line_sr_t_02_8663.sr33, dlt_hah_ae_line_sr_t_02_8663.sr34, dlt_hah_ae_line_sr_t_02_8663.sr35, dlt_hah_ae_line_sr_t_02_8663.sr36, dlt_hah_ae_line_sr_t_02_8663.sr37, dlt_hah_ae_line_sr_t_02_8663.sr38, dlt_hah_ae_line_sr_t_02_8663.sr39, dlt_hah_ae_line_sr_t_02_8663.sr40, dlt_hah_ae_line_sr_t_02_8663.sr41, dlt_hah_ae_line_sr_t_02_8663.sr42, dlt_hah_ae_line_sr_t_02_8663.sr43, dlt_hah_ae_line_sr_t_02_8663.sr44, dlt_hah_ae_line_sr_t_02_8663.sr45, dlt_hah_ae_line_sr_t_02_8663.sr46, dlt_hah_ae_line_sr_t_02_8663.sr47, dlt_hah_ae_line_sr_t_02_8663.sr48, dlt_hah_ae_line_sr_t_02_8663.sr49, dlt_hah_ae_line_sr_t_02_8663.sr50, dlt_hah_ae_line_sr_t_02_8663.sr51, dlt_hah_ae_line_sr_t_02_8663.sr52, dlt_hah_ae_line_sr_t_02_8663.sr53, dlt_hah_ae_line_sr_t_02_8663.sr54, dlt_hah_ae_line_sr_t_02_8663.sr55, dlt_hah_ae_line_sr_t_02_8663.sr56, dlt_hah_ae_line_sr_t_02_8663.sr57, dlt_hah_ae_line_sr_t_02_8663.sr58, dlt_hah_ae_line_sr_t_02_8663.sr59, dlt_hah_ae_line_sr_t_02_8663.sr60, dlt_hah_ae_line_sr_t_02_8663.unit_code, dlt_hah_ae_line_sr_t_02_8663.created_by, dlt_hah_ae_line_sr_t_02_8663.creation_date, dlt_hah_ae_line_sr_t_02_8663.last_updated_by, dlt_hah_ae_line_sr_t_02_8663.last_update_date, dlt_hah_ae_line_sr_t_02_8663.ss_id, dlt_hah_ae_line_sr_t_02_8663.del_flag, dlt_hah_ae_line_sr_t_02_8663.crt_cycle_id, (20230520000000::bigint), ((-1)), ((-1)), ('N'::text), ((pg_systimestamp())::timestamp(0) without time zone), event_1u18olr.ae_header_id, event_1u18olr.ae_line_num, event_1u18olr.application_code, event_1u18olr.sr1, event_1u18olr.sr2, event_1u18olr.sr3, event_1u18olr.sr4, event_1u18olr.sr5, event_1u18olr.sr6, event_1u18olr.sr7, event_1u18olr.sr8, event_1u18olr.sr9, event_1u18olr.sr10, event_1u18olr.sr11, event_1u18olr.sr12, event_1u18olr.sr13, event_1u18olr.sr14, event_1u18olr.sr15, event_1u18olr.sr16, event_1u18olr.sr17, event_1u18olr.sr18, event_1u18olr.sr19, event_1u18olr.sr20, event_1u18olr.sr21, event_1u18olr.sr22, event_1u18olr.sr23, event_1u18olr.sr24, event_1u18olr.sr25, event_1u18olr.sr26, event_1u18olr.sr27, event_1u18olr.sr28, event_1u18olr.sr29, event_1u18olr.sr30, event_1u18olr.sr31, event_1u18olr.sr32, event_1u18olr.sr33, event_1u18olr.sr34, event_1u18olr.sr35, event_1u18olr.sr36, event_1u18olr.sr37, event_1u18olr.sr38, event_1u18olr.sr39, event_1u18olr.sr40, event_1u18olr.sr41, event_1u18olr.sr42, event_1u18olr.sr43, event_1u18olr.sr44, event_1u18olr.sr45, event_1u18olr.sr46, event_1u18olr.sr47, event_1u18olr.sr48, event_1u18olr.sr49, event_1u18olr.sr50, event_1u18olr.sr51, event_1u18olr.sr52, event_1u18olr.sr53, event_1u18olr.sr54, event_1u18olr.sr55, event_1u18olr.sr56, event_1u18olr.sr57, event_1u18olr.sr58, event_1u18olr.sr59, event_1u18olr.sr60, event_1u18olr.unit_code, event_1u18olr.created_by, event_1u18olr.creation_date, event_1u18olr.last_updated_by, event_1u18olr.last_update_date, event_1u18olr.ss_id, event_1u18olr.del_flag, event_1u18olr.crt_cycle_id, event_1u18olr.last_upd_cycle_id, event_1u18olr.crt_job_instance_id, event_1u18olr.upd_job_instance_id, event_1u18olr.dq_improve_flag, event_1u18olr.last_modified_date, event_1u18olr.ctid, event_1u18olr.xc_node_id, event_1u18olr.tableoid, dlt_hah_ae_line_sr_t_02_8663.ae_header_id, dlt_hah_ae_line_sr_t_02_8663.ae_line_num, dlt_hah_ae_line_sr_t_02_8663.application_code, dlt_hah_ae_line_sr_t_02_8663.sr1, dlt_hah_ae_line_sr_t_02_8663.sr2, dlt_hah_ae_line_sr_t_02_8663.sr3, dlt_hah_ae_line_sr_t_02_8663.sr4, dlt_hah_ae_line_sr_t_02_8663.sr5, dlt_hah_ae_line_sr_t_02_8663.sr6, dlt_hah_ae_line_sr_t_02_8663.sr7, dlt_hah_ae_line_sr_t_02_8663.sr8, dlt_hah_ae_line_sr_t_02_8663.sr9, dlt_hah_ae_line_sr_t_02_8663.sr10, dlt_hah_ae_line_sr_t_02_8663.sr11, dlt_hah_ae_line_sr_t_02_8663.sr12, dlt_hah_ae_line_sr_t_02_8663.sr13, dlt_hah_ae_line_sr_t_02_8663.sr14, dlt_hah_ae_line_sr_t_02_8663.sr15, dlt_hah_ae_line_sr_t_02_8663.sr16, dlt_hah_ae_line_sr_t_02_8663.sr17, dlt_hah_ae_line_sr_t_02_8663.sr18, dlt_hah_ae_line_sr_t_02_8663.sr19, dlt_hah_ae_line_sr_t_02_8663.sr20, dlt_hah_ae_line_sr_t_02_8663.sr21, dlt_hah_ae_line_sr_t_02_8663.sr22, dlt_hah_ae_line_sr_t_02_8663.sr23, dlt_hah_ae_line_sr_t_02_8663.sr24, dlt_hah_ae_line_sr_t_02_8663.sr25, dlt_hah_ae_line_sr_t_02_8663.sr26, dlt_hah_ae_line_sr_t_02_8663.sr27, dlt_hah_ae_line_sr_t_02_8663.sr28, dlt_hah_ae_line_sr_t_02_8663.sr29, dlt_hah_ae_line_sr_t_02_8663.sr30, dlt_hah_ae_line_sr_t_02_8663.sr31, dlt_hah_ae_line_sr_t_02_8663.sr32, dlt_hah_ae_line_sr_t_02_8663.sr33, dlt_hah_ae_line_sr_t_02_8663.sr34, dlt_hah_ae_line_sr_t_02_8663.sr35, dlt_hah_ae_line_sr_t_02_8663.sr36, dlt_hah_ae_line_sr_t_02_8663.sr37, dlt_hah_ae_line_sr_t_02_8663.sr38, dlt_hah_ae_line_sr_t_02_8663.sr39, dlt_hah_ae_line_sr_t_02_8663.sr40, dlt_hah_ae_line_sr_t_02_8663.sr41, dlt_hah_ae_line_sr_t_02_8663.sr42, dlt_hah_ae_line_sr_t_02_8663.sr43, dlt_hah_ae_line_sr_t_02_8663.sr44, dlt_hah_ae_line_sr_t_02_8663.sr45, dlt_hah_ae_line_sr_t_02_8663.sr46, dlt_hah_ae_line_sr_t_02_8663.sr47, dlt_hah_ae_line_sr_t_02_8663.sr48, dlt_hah_ae_line_sr_t_02_8663.sr49, dlt_hah_ae_line_sr_t_02_8663.sr50, dlt_hah_ae_line_sr_t_02_8663.sr51, dlt_hah_ae_line_sr_t_02_8663.sr52, dlt_hah_ae_line_sr_t_02_8663.sr53, dlt_hah_ae_line_sr_t_02_8663.sr54, dlt_hah_ae_line_sr_t_02_8663.sr55, dlt_hah_ae_line_sr_t_02_8663.sr56, dlt_hah_ae_line_sr_t_02_8663.sr57, dlt_hah_ae_line_sr_t_02_8663.sr58, dlt_hah_ae_line_sr_t_02_8663.sr59, dlt_hah_ae_line_sr_t_02_8663.sr60, dlt_hah_ae_line_sr_t_02_8663.unit_code, dlt_hah_ae_line_sr_t_02_8663.created_by, dlt_hah_ae_line_sr_t_02_8663.creation_date, dlt_hah_ae_line_sr_t_02_8663.last_updated_by, dlt_hah_ae_line_sr_t_02_8663.last_update_date, dlt_hah_ae_line_sr_t_02_8663.ss_id, dlt_hah_ae_line_sr_t_02_8663.del_flag, dlt_hah_ae_line_sr_t_02_8663.crt_cycle_id, (20230520000000::bigint), ((-1)), ((-1)), ('N'::text), ((pg_systimestamp())::timestamp(0) without time zone), (CASE WHEN (event_1u18olr.ctid IS NULL) THEN dlt_hah_ae_line_sr_t_02_8663.ae_header_id ELSE event_1u18olr.ae_header_id END), (CASE WHEN (event_1u18olr.ctid IS NULL) THEN dlt_hah_ae_line_sr_t_02_8663.ae_line_num ELSE event_1u18olr.ae_line_num END)
Distribute Key: (CASE WHEN (event_1u18olr.ctid IS NULL) THEN dlt_hah_ae_line_sr_t_02_8663.ae_header_id ELSE event_1u18olr.ae_header_id END), (CASE WHEN (event_1u18olr.ctid IS NULL) THEN dlt_hah_ae_line_sr_t_02_8663.ae_line_num ELSE event_1u18olr.ae_line_num END)
Spawn on: (LC_DL1) dn_6001_6002, dn_6003_6004, dn_6005_6006, dn_6007_6008, dn_6009_6010, dn_6011_6012, dn_6013_6014, dn_6015_6016, dn_6017_6018, dn_6019_6020, dn_6021_6022, dn_6023_6024, dn_6025_6026, dn_6027_6028, dn_6029_6030, dn_6031_6032, dn_6033_6034, dn_6035_6036, dn_6037_6038, dn_6039_6040, dn_6041_6042, dn_6043_6044, dn_6045_6046, dn_6047_6048, dn_6061_6062, dn_6063_6064, dn_6065_6066, dn_6067_6068, dn_6069_6070, dn_6071_6072, dn_6073_6074, dn_6075_6076, dn_6077_6078, dn_6079_6080, dn_6081_6082, dn_6083_6084, dn_6097_6098, dn_6099_6100, dn_6101_6102, dn_6103_6104, dn_6105_6106, dn_6107_6108, dn_6109_6110, dn_6111_6112, dn_6113_6114, dn_6115_6116, dn_6117_6118, dn_6119_6120, dn_6121_6122, dn_6123_6124, dn_6125_6126, dn_6127_6128, dn_6129_6130, dn_6131_6132, dn_6157_6158, dn_6159_6160, dn_6161_6162, dn_6163_6164, dn_6165_6166, dn_6167_6168, dn_6169_6170, dn_6171_6172, dn_6173_6174, dn_6175_6176, dn_6177_6178, dn_6179_6180, dn_6193_6194, dn_6195_6196, dn_6197_6198, dn_6199_6200, dn_6201_6202, dn_6203_6204, dn_6205_6206, dn_6207_6208, dn_6209_6210, dn_6211_6212, dn_6213_6214, dn_6215_6216, dn_6229_6230, dn_6231_6232, dn_6233_6234, dn_6235_6236, dn_6237_6238, dn_6239_6240, dn_6241_6242, dn_6243_6244, dn_6245_6246, dn_6247_6248, dn_6249_6250, dn_6251_6252, dn_6277_6278, dn_6279_6280, dn_6281_6282, dn_6283_6284, dn_6285_6286, dn_6287_6288, dn_6289_6290, dn_6291_6292, dn_6293_6294, dn_6295_6296, dn_6297_6298, dn_6299_6300
Consumer Nodes: (LC_DL1) dn_6001_6002, dn_6003_6004, dn_6005_6006, dn_6007_6008, dn_6009_6010, dn_6011_6012, dn_6013_6014, dn_6015_6016, dn_6017_6018, dn_6019_6020, dn_6021_6022, dn_6023_6024, dn_6025_6026, dn_6027_6028, dn_6029_6030, dn_6031_6032, dn_6033_6034, dn_6035_6036, dn_6037_6038, dn_6039_6040, dn_6041_6042, dn_6043_6044, dn_6045_6046, dn_6047_6048, dn_6061_6062, dn_6063_6064, dn_6065_6066, dn_6067_6068, dn_6069_6070, dn_6071_6072, dn_6073_6074, dn_6075_6076, dn_6077_6078, dn_6079_6080, dn_6081_6082, dn_6083_6084, dn_6097_6098, dn_6099_6100, dn_6101_6102, dn_6103_6104, dn_6105_6106, dn_6107_6108, dn_6109_6110, dn_6111_6112, dn_6113_6114, dn_6115_6116, dn_6117_6118, dn_6119_6120, dn_6121_6122, dn_6123_6124, dn_6125_6126, dn_6127_6128, dn_6129_6130, dn_6131_6132, dn_6157_6158, dn_6159_6160, dn_6161_6162, dn_6163_6164, dn_6165_6166, dn_6167_6168, dn_6169_6170, dn_6171_6172, dn_6173_6174, dn_6175_6176, dn_6177_6178, dn_6179_6180, dn_6193_6194, dn_6195_6196, dn_6197_6198, dn_6199_6200, dn_6201_6202, dn_6203_6204, dn_6205_6206, dn_6207_6208, dn_6209_6210, dn_6211_6212, dn_6213_6214, dn_6215_6216, dn_6229_6230, dn_6231_6232, dn_6233_6234, dn_6235_6236, dn_6237_6238, dn_6239_6240, dn_6241_6242, dn_6243_6244, dn_6245_6246, dn_6247_6248, dn_6249_6250, dn_6251_6252, dn_6277_6278, dn_6279_6280, dn_6281_6282, dn_6283_6284, dn_6285_6286, dn_6287_6288, dn_6289_6290, dn_6291_6292, dn_6293_6294, dn_6295_6296, dn_6297_6298, dn_6299_6300
5 --Vector Hash Left Join (6, 7)
Output: dlt_hah_ae_line_sr_t_02_8663.ae_header_id, dlt_hah_ae_line_sr_t_02_8663.ae_line_num, dlt_hah_ae_line_sr_t_02_8663.application_code, dlt_hah_ae_line_sr_t_02_8663.sr1, dlt_hah_ae_line_sr_t_02_8663.sr2, dlt_hah_ae_line_sr_t_02_8663.sr3, dlt_hah_ae_line_sr_t_02_8663.sr4, dlt_hah_ae_line_sr_t_02_8663.sr5, dlt_hah_ae_line_sr_t_02_8663.sr6, dlt_hah_ae_line_sr_t_02_8663.sr7, dlt_hah_ae_line_sr_t_02_8663.sr8, dlt_hah_ae_line_sr_t_02_8663.sr9, dlt_hah_ae_line_sr_t_02_8663.sr10, dlt_hah_ae_line_sr_t_02_8663.sr11, dlt_hah_ae_line_sr_t_02_8663.sr12, dlt_hah_ae_line_sr_t_02_8663.sr13, dlt_hah_ae_line_sr_t_02_8663.sr14, dlt_hah_ae_line_sr_t_02_8663.sr15, dlt_hah_ae_line_sr_t_02_8663.sr16, dlt_hah_ae_line_sr_t_02_8663.sr17, dlt_hah_ae_line_sr_t_02_8663.sr18, dlt_hah_ae_line_sr_t_02_8663.sr19, dlt_hah_ae_line_sr_t_02_8663.sr20, dlt_hah_ae_line_sr_t_02_8663.sr21, dlt_hah_ae_line_sr_t_02_8663.sr22, dlt_hah_ae_line_sr_t_02_8663.sr23, dlt_hah_ae_line_sr_t_02_8663.sr24, dlt_hah_ae_line_sr_t_02_8663.sr25, dlt_hah_ae_line_sr_t_02_8663.sr26, dlt_hah_ae_line_sr_t_02_8663.sr27, dlt_hah_ae_line_sr_t_02_8663.sr28, dlt_hah_ae_line_sr_t_02_8663.sr29, dlt_hah_ae_line_sr_t_02_8663.sr30, dlt_hah_ae_line_sr_t_02_8663.sr31, dlt_hah_ae_line_sr_t_02_8663.sr32, dlt_hah_ae_line_sr_t_02_8663.sr33, dlt_hah_ae_line_sr_t_02_8663.sr34, dlt_hah_ae_line_sr_t_02_8663.sr35, dlt_hah_ae_line_sr_t_02_8663.sr36, dlt_hah_ae_line_sr_t_02_8663.sr37, dlt_hah_ae_line_sr_t_02_8663.sr38, dlt_hah_ae_line_sr_t_02_8663.sr39, dlt_hah_ae_line_sr_t_02_8663.sr40, dlt_hah_ae_line_sr_t_02_8663.sr41, dlt_hah_ae_line_sr_t_02_8663.sr42, dlt_hah_ae_line_sr_t_02_8663.sr43, dlt_hah_ae_line_sr_t_02_8663.sr44, dlt_hah_ae_line_sr_t_02_8663.sr45, dlt_hah_ae_line_sr_t_02_8663.sr46, dlt_hah_ae_line_sr_t_02_8663.sr47, dlt_hah_ae_line_sr_t_02_8663.sr48, dlt_hah_ae_line_sr_t_02_8663.sr49, dlt_hah_ae_line_sr_t_02_8663.sr50, dlt_hah_ae_line_sr_t_02_8663.sr51, dlt_hah_ae_line_sr_t_02_8663.sr52, dlt_hah_ae_line_sr_t_02_8663.sr53, dlt_hah_ae_line_sr_t_02_8663.sr54, dlt_hah_ae_line_sr_t_02_8663.sr55, dlt_hah_ae_line_sr_t_02_8663.sr56, dlt_hah_ae_line_sr_t_02_8663.sr57, dlt_hah_ae_line_sr_t_02_8663.sr58, dlt_hah_ae_line_sr_t_02_8663.sr59, dlt_hah_ae_line_sr_t_02_8663.sr60, dlt_hah_ae_line_sr_t_02_8663.unit_code, dlt_hah_ae_line_sr_t_02_8663.created_by, dlt_hah_ae_line_sr_t_02_8663.creation_date, dlt_hah_ae_line_sr_t_02_8663.last_updated_by, dlt_hah_ae_line_sr_t_02_8663.last_update_date, dlt_hah_ae_line_sr_t_02_8663.ss_id, dlt_hah_ae_line_sr_t_02_8663.del_flag, dlt_hah_ae_line_sr_t_02_8663.crt_cycle_id, (20230520000000::bigint), ((-1)), ((-1)), ('N'::text), ((pg_systimestamp())::timestamp(0) without time zone), event_1u18olr.ae_header_id, event_1u18olr.ae_line_num, event_1u18olr.application_code, event_1u18olr.sr1, event_1u18olr.sr2, event_1u18olr.sr3, event_1u18olr.sr4, event_1u18olr.sr5, event_1u18olr.sr6, event_1u18olr.sr7, event_1u18olr.sr8, event_1u18olr.sr9, event_1u18olr.sr10, event_1u18olr.sr11, event_1u18olr.sr12, event_1u18olr.sr13, event_1u18olr.sr14, event_1u18olr.sr15, event_1u18olr.sr16, event_1u18olr.sr17, event_1u18olr.sr18, event_1u18olr.sr19, event_1u18olr.sr20, event_1u18olr.sr21, event_1u18olr.sr22, event_1u18olr.sr23, event_1u18olr.sr24, event_1u18olr.sr25, event_1u18olr.sr26, event_1u18olr.sr27, event_1u18olr.sr28, event_1u18olr.sr29, event_1u18olr.sr30, event_1u18olr.sr31, event_1u18olr.sr32, event_1u18olr.sr33, event_1u18olr.sr34, event_1u18olr.sr35, event_1u18olr.sr36, event_1u18olr.sr37, event_1u18olr.sr38, event_1u18olr.sr39, event_1u18olr.sr40, event_1u18olr.sr41, event_1u18olr.sr42, event_1u18olr.sr43, event_1u18olr.sr44, event_1u18olr.sr45, event_1u18olr.sr46, event_1u18olr.sr47, event_1u18olr.sr48, event_1u18olr.sr49, event_1u18olr.sr50, event_1u18olr.sr51, event_1u18olr.sr52, event_1u18olr.sr53, event_1u18olr.sr54, event_1u18olr.sr55, event_1u18olr.sr56, event_1u18olr.sr57, event_1u18olr.sr58, event_1u18olr.sr59, event_1u18olr.sr60, event_1u18olr.unit_code, event_1u18olr.created_by, event_1u18olr.creation_date, event_1u18olr.last_updated_by, event_1u18olr.last_update_date, event_1u18olr.ss_id, event_1u18olr.del_flag, event_1u18olr.crt_cycle_id, event_1u18olr.last_upd_cycle_id, event_1u18olr.crt_job_instance_id, event_1u18olr.upd_job_instance_id, event_1u18olr.dq_improve_flag, event_1u18olr.last_modified_date, event_1u18olr.ctid, event_1u18olr.xc_node_id, event_1u18olr.tableoid, dlt_hah_ae_line_sr_t_02_8663.ae_header_id, dlt_hah_ae_line_sr_t_02_8663.ae_line_num, dlt_hah_ae_line_sr_t_02_8663.application_code, dlt_hah_ae_line_sr_t_02_8663.sr1, dlt_hah_ae_line_sr_t_02_8663.sr2, dlt_hah_ae_line_sr_t_02_8663.sr3, dlt_hah_ae_line_sr_t_02_8663.sr4, dlt_hah_ae_line_sr_t_02_8663.sr5, dlt_hah_ae_line_sr_t_02_8663.sr6, dlt_hah_ae_line_sr_t_02_8663.sr7, dlt_hah_ae_line_sr_t_02_8663.sr8, dlt_hah_ae_line_sr_t_02_8663.sr9, dlt_hah_ae_line_sr_t_02_8663.sr10, dlt_hah_ae_line_sr_t_02_8663.sr11, dlt_hah_ae_line_sr_t_02_8663.sr12, dlt_hah_ae_line_sr_t_02_8663.sr13, dlt_hah_ae_line_sr_t_02_8663.sr14, dlt_hah_ae_line_sr_t_02_8663.sr15, dlt_hah_ae_line_sr_t_02_8663.sr16, dlt_hah_ae_line_sr_t_02_8663.sr17, dlt_hah_ae_line_sr_t_02_8663.sr18, dlt_hah_ae_line_sr_t_02_8663.sr19, dlt_hah_ae_line_sr_t_02_8663.sr20, dlt_hah_ae_line_sr_t_02_8663.sr21, dlt_hah_ae_line_sr_t_02_8663.sr22, dlt_hah_ae_line_sr_t_02_8663.sr23, dlt_hah_ae_line_sr_t_02_8663.sr24, dlt_hah_ae_line_sr_t_02_8663.sr25, dlt_hah_ae_line_sr_t_02_8663.sr26, dlt_hah_ae_line_sr_t_02_8663.sr27, dlt_hah_ae_line_sr_t_02_8663.sr28, dlt_hah_ae_line_sr_t_02_8663.sr29, dlt_hah_ae_line_sr_t_02_8663.sr30, dlt_hah_ae_line_sr_t_02_8663.sr31, dlt_hah_ae_line_sr_t_02_8663.sr32, dlt_hah_ae_line_sr_t_02_8663.sr33, dlt_hah_ae_line_sr_t_02_8663.sr34, dlt_hah_ae_line_sr_t_02_8663.sr35, dlt_hah_ae_line_sr_t_02_8663.sr36, dlt_hah_ae_line_sr_t_02_8663.sr37, dlt_hah_ae_line_sr_t_02_8663.sr38, dlt_hah_ae_line_sr_t_02_8663.sr39, dlt_hah_ae_line_sr_t_02_8663.sr40, dlt_hah_ae_line_sr_t_02_8663.sr41, dlt_hah_ae_line_sr_t_02_8663.sr42, dlt_hah_ae_line_sr_t_02_8663.sr43, dlt_hah_ae_line_sr_t_02_8663.sr44, dlt_hah_ae_line_sr_t_02_8663.sr45, dlt_hah_ae_line_sr_t_02_8663.sr46, dlt_hah_ae_line_sr_t_02_8663.sr47, dlt_hah_ae_line_sr_t_02_8663.sr48, dlt_hah_ae_line_sr_t_02_8663.sr49, dlt_hah_ae_line_sr_t_02_8663.sr50, dlt_hah_ae_line_sr_t_02_8663.sr51, dlt_hah_ae_line_sr_t_02_8663.sr52, dlt_hah_ae_line_sr_t_02_8663.sr53, dlt_hah_ae_line_sr_t_02_8663.sr54, dlt_hah_ae_line_sr_t_02_8663.sr55, dlt_hah_ae_line_sr_t_02_8663.sr56, dlt_hah_ae_line_sr_t_02_8663.sr57, dlt_hah_ae_line_sr_t_02_8663.sr58, dlt_hah_ae_line_sr_t_02_8663.sr59, dlt_hah_ae_line_sr_t_02_8663.sr60, dlt_hah_ae_line_sr_t_02_8663.unit_code, dlt_hah_ae_line_sr_t_02_8663.created_by, dlt_hah_ae_line_sr_t_02_8663.creation_date, dlt_hah_ae_line_sr_t_02_8663.last_updated_by, dlt_hah_ae_line_sr_t_02_8663.last_update_date, dlt_hah_ae_line_sr_t_02_8663.ss_id, dlt_hah_ae_line_sr_t_02_8663.del_flag, dlt_hah_ae_line_sr_t_02_8663.crt_cycle_id, (20230520000000::bigint), ((-1)), ((-1)), ('N'::text), ((pg_systimestamp())::timestamp(0) without time zone), CASE WHEN (event_1u18olr.ctid IS NULL) THEN dlt_hah_ae_line_sr_t_02_8663.ae_header_id ELSE event_1u18olr.ae_header_id END, CASE WHEN (event_1u18olr.ctid IS NULL) THEN dlt_hah_ae_line_sr_t_02_8663.ae_line_num ELSE event_1u18olr.ae_line_num END
Exec Nodes: (LC_DL1) dn_6001_6002, dn_6003_6004, dn_6005_6006, dn_6007_6008, dn_6009_6010, dn_6011_6012, dn_6013_6014, dn_6015_6016, dn_6017_6018, dn_6019_6020, dn_6021_6022, dn_6023_6024, dn_6025_6026, dn_6027_6028, dn_6029_6030, dn_6031_6032, dn_6033_6034, dn_6035_6036, dn_6037_6038, dn_6039_6040, dn_6041_6042, dn_6043_6044, dn_6045_6046, dn_6047_6048, dn_6061_6062, dn_6063_6064, dn_6065_6066, dn_6067_6068, dn_6069_6070, dn_6071_6072, dn_6073_6074, dn_6075_6076, dn_6077_6078, dn_6079_6080, dn_6081_6082, dn_6083_6084, dn_6097_6098, dn_6099_6100, dn_6101_6102, dn_6103_6104, dn_6105_6106, dn_6107_6108, dn_6109_6110, dn_6111_6112, dn_6113_6114, dn_6115_6116, dn_6117_6118, dn_6119_6120, dn_6121_6122, dn_6123_6124, dn_6125_6126, dn_6127_6128, dn_6129_6130, dn_6131_6132, dn_6157_6158, dn_6159_6160, dn_6161_6162, dn_6163_6164, dn_6165_6166, dn_6167_6168, dn_6169_6170, dn_6171_6172, dn_6173_6174, dn_6175_6176, dn_6177_6178, dn_6179_6180, dn_6193_6194, dn_6195_6196, dn_6197_6198, dn_6199_6200, dn_6201_6202, dn_6203_6204, dn_6205_6206, dn_6207_6208, dn_6209_6210, dn_6211_6212, dn_6213_6214, dn_6215_6216, dn_6229_6230, dn_6231_6232, dn_6233_6234, dn_6235_6236, dn_6237_6238, dn_6239_6240, dn_6241_6242, dn_6243_6244, dn_6245_6246, dn_6247_6248, dn_6249_6250, dn_6251_6252, dn_6277_6278, dn_6279_6280, dn_6281_6282, dn_6283_6284, dn_6285_6286, dn_6287_6288, dn_6289_6290, dn_6291_6292, dn_6293_6294, dn_6295_6296, dn_6297_6298, dn_6299_6300
6 --CStore Scan on stgfin.dlt_hah_ae_line_sr_t_02_8663
Output: dlt_hah_ae_line_sr_t_02_8663.ae_header_id, dlt_hah_ae_line_sr_t_02_8663.ae_line_num, dlt_hah_ae_line_sr_t_02_8663.application_code, dlt_hah_ae_line_sr_t_02_8663.sr1, dlt_hah_ae_line_sr_t_02_8663.sr2, dlt_hah_ae_line_sr_t_02_8663.sr3, dlt_hah_ae_line_sr_t_02_8663.sr4, dlt_hah_ae_line_sr_t_02_8663.sr5, dlt_hah_ae_line_sr_t_02_8663.sr6, dlt_hah_ae_line_sr_t_02_8663.sr7, dlt_hah_ae_line_sr_t_02_8663.sr8, dlt_hah_ae_line_sr_t_02_8663.sr9, dlt_hah_ae_line_sr_t_02_8663.sr10, dlt_hah_ae_line_sr_t_02_8663.sr11, dlt_hah_ae_line_sr_t_02_8663.sr12, dlt_hah_ae_line_sr_t_02_8663.sr13, dlt_hah_ae_line_sr_t_02_8663.sr14, dlt_hah_ae_line_sr_t_02_8663.sr15, dlt_hah_ae_line_sr_t_02_8663.sr16, dlt_hah_ae_line_sr_t_02_8663.sr17, dlt_hah_ae_line_sr_t_02_8663.sr18, dlt_hah_ae_line_sr_t_02_8663.sr19, dlt_hah_ae_line_sr_t_02_8663.sr20, dlt_hah_ae_line_sr_t_02_8663.sr21, dlt_hah_ae_line_sr_t_02_8663.sr22, dlt_hah_ae_line_sr_t_02_8663.sr23, dlt_hah_ae_line_sr_t_02_8663.sr24, dlt_hah_ae_line_sr_t_02_8663.sr25, dlt_hah_ae_line_sr_t_02_8663.sr26, dlt_hah_ae_line_sr_t_02_8663.sr27, dlt_hah_ae_line_sr_t_02_8663.sr28, dlt_hah_ae_line_sr_t_02_8663.sr29, dlt_hah_ae_line_sr_t_02_8663.sr30, dlt_hah_ae_line_sr_t_02_8663.sr31, dlt_hah_ae_line_sr_t_02_8663.sr32, dlt_hah_ae_line_sr_t_02_8663.sr33, dlt_hah_ae_line_sr_t_02_8663.sr34, dlt_hah_ae_line_sr_t_02_8663.sr35, dlt_hah_ae_line_sr_t_02_8663.sr36, dlt_hah_ae_line_sr_t_02_8663.sr37, dlt_hah_ae_line_sr_t_02_8663.sr38, dlt_hah_ae_line_sr_t_02_8663.sr39, dlt_hah_ae_line_sr_t_02_8663.sr40, dlt_hah_ae_line_sr_t_02_8663.sr41, dlt_hah_ae_line_sr_t_02_8663.sr42, dlt_hah_ae_line_sr_t_02_8663.sr43, dlt_hah_ae_line_sr_t_02_8663.sr44, dlt_hah_ae_line_sr_t_02_8663.sr45, dlt_hah_ae_line_sr_t_02_8663.sr46, dlt_hah_ae_line_sr_t_02_8663.sr47, dlt_hah_ae_line_sr_t_02_8663.sr48, dlt_hah_ae_line_sr_t_02_8663.sr49, dlt_hah_ae_line_sr_t_02_8663.sr50, dlt_hah_ae_line_sr_t_02_8663.sr51, dlt_hah_ae_line_sr_t_02_8663.sr52, dlt_hah_ae_line_sr_t_02_8663.sr53, dlt_hah_ae_line_sr_t_02_8663.sr54, dlt_hah_ae_line_sr_t_02_8663.sr55, dlt_hah_ae_line_sr_t_02_8663.sr56, dlt_hah_ae_line_sr_t_02_8663.sr57, dlt_hah_ae_line_sr_t_02_8663.sr58, dlt_hah_ae_line_sr_t_02_8663.sr59, dlt_hah_ae_line_sr_t_02_8663.sr60, dlt_hah_ae_line_sr_t_02_8663.unit_code, dlt_hah_ae_line_sr_t_02_8663.created_by, dlt_hah_ae_line_sr_t_02_8663.creation_date, dlt_hah_ae_line_sr_t_02_8663.last_updated_by, dlt_hah_ae_line_sr_t_02_8663.last_update_date, dlt_hah_ae_line_sr_t_02_8663.ss_id, dlt_hah_ae_line_sr_t_02_8663.del_flag, dlt_hah_ae_line_sr_t_02_8663.crt_cycle_id, 20230520000000::bigint, (-1), (-1), 'N'::text, (pg_systimestamp())::timestamp(0) without time zone
Distribute Key: dlt_hah_ae_line_sr_t_02_8663.ae_header_id, dlt_hah_ae_line_sr_t_02_8663.ae_line_num
Exec Nodes: (LC_DL1) dn_6001_6002, dn_6003_6004, dn_6005_6006, dn_6007_6008, dn_6009_6010, dn_6011_6012, dn_6013_6014, dn_6015_6016, dn_6017_6018, dn_6019_6020, dn_6021_6022, dn_6023_6024, dn_6025_6026, dn_6027_6028, dn_6029_6030, dn_6031_6032, dn_6033_6034, dn_6035_6036, dn_6037_6038, dn_6039_6040, dn_6041_6042, dn_6043_6044, dn_6045_6046, dn_6047_6048, dn_6061_6062, dn_6063_6064, dn_6065_6066, dn_6067_6068, dn_6069_6070, dn_6071_6072, dn_6073_6074, dn_6075_6076, dn_6077_6078, dn_6079_6080, dn_6081_6082, dn_6083_6084, dn_6097_6098, dn_6099_6100, dn_6101_6102, dn_6103_6104, dn_6105_6106, dn_6107_6108, dn_6109_6110, dn_6111_6112, dn_6113_6114, dn_6115_6116, dn_6117_6118, dn_6119_6120, dn_6121_6122, dn_6123_6124, dn_6125_6126, dn_6127_6128, dn_6129_6130, dn_6131_6132, dn_6157_6158, dn_6159_6160, dn_6161_6162, dn_6163_6164, dn_6165_6166, dn_6167_6168, dn_6169_6170, dn_6171_6172, dn_6173_6174, dn_6175_6176, dn_6177_6178, dn_6179_6180, dn_6193_6194, dn_6195_6196, dn_6197_6198, dn_6199_6200, dn_6201_6202, dn_6203_6204, dn_6205_6206, dn_6207_6208, dn_6209_6210, dn_6211_6212, dn_6213_6214, dn_6215_6216, dn_6229_6230, dn_6231_6232, dn_6233_6234, dn_6235_6236, dn_6237_6238, dn_6239_6240, dn_6241_6242, dn_6243_6244, dn_6245_6246, dn_6247_6248, dn_6249_6250, dn_6251_6252, dn_6277_6278, dn_6279_6280, dn_6281_6282, dn_6283_6284, dn_6285_6286, dn_6287_6288, dn_6289_6290, dn_6291_6292, dn_6293_6294, dn_6295_6296, dn_6297_6298, dn_6299_6300
7 --Vector Partition Iterator
Output: event_1u18olr.ae_header_id, event_1u18olr.ae_line_num, event_1u18olr.application_code, event_1u18olr.sr1, event_1u18olr.sr2, event_1u18olr.sr3, event_1u18olr.sr4, event_1u18olr.sr5, event_1u18olr.sr6, event_1u18olr.sr7, event_1u18olr.sr8, event_1u18olr.sr9, event_1u18olr.sr10, event_1u18olr.sr11, event_1u18olr.sr12, event_1u18olr.sr13, event_1u18olr.sr14, event_1u18olr.sr15, event_1u18olr.sr16, event_1u18olr.sr17, event_1u18olr.sr18, event_1u18olr.sr19, event_1u18olr.sr20, event_1u18olr.sr21, event_1u18olr.sr22, event_1u18olr.sr23, event_1u18olr.sr24, event_1u18olr.sr25, event_1u18olr.sr26, event_1u18olr.sr27, event_1u18olr.sr28, event_1u18olr.sr29, event_1u18olr.sr30, event_1u18olr.sr31, event_1u18olr.sr32, event_1u18olr.sr33, event_1u18olr.sr34, event_1u18olr.sr35, event_1u18olr.sr36, event_1u18olr.sr37, event_1u18olr.sr38, event_1u18olr.sr39, event_1u18olr.sr40, event_1u18olr.sr41, event_1u18olr.sr42, event_1u18olr.sr43, event_1u18olr.sr44, event_1u18olr.sr45, event_1u18olr.sr46, event_1u18olr.sr47, event_1u18olr.sr48, event_1u18olr.sr49, event_1u18olr.sr50, event_1u18olr.sr51, event_1u18olr.sr52, event_1u18olr.sr53, event_1u18olr.sr54, event_1u18olr.sr55, event_1u18olr.sr56, event_1u18olr.sr57, event_1u18olr.sr58, event_1u18olr.sr59, event_1u18olr.sr60, event_1u18olr.unit_code, event_1u18olr.created_by, event_1u18olr.creation_date, event_1u18olr.last_updated_by, event_1u18olr.last_update_date, event_1u18olr.ss_id, event_1u18olr.del_flag, event_1u18olr.crt_cycle_id, event_1u18olr.last_upd_cycle_id, event_1u18olr.crt_job_instance_id, event_1u18olr.upd_job_instance_id, event_1u18olr.dq_improve_flag, event_1u18olr.last_modified_date, event_1u18olr.ctid, event_1u18olr.xc_node_id, event_1u18olr.tableoid
Exec Nodes: (LC_DL1) dn_6001_6002, dn_6003_6004, dn_6005_6006, dn_6007_6008, dn_6009_6010, dn_6011_6012, dn_6013_6014, dn_6015_6016, dn_6017_6018, dn_6019_6020, dn_6021_6022, dn_6023_6024, dn_6025_6026, dn_6027_6028, dn_6029_6030, dn_6031_6032, dn_6033_6034, dn_6035_6036, dn_6037_6038, dn_6039_6040, dn_6041_6042, dn_6043_6044, dn_6045_6046, dn_6047_6048, dn_6061_6062, dn_6063_6064, dn_6065_6066, dn_6067_6068, dn_6069_6070, dn_6071_6072, dn_6073_6074, dn_6075_6076, dn_6077_6078, dn_6079_6080, dn_6081_6082, dn_6083_6084, dn_6097_6098, dn_6099_6100, dn_6101_6102, dn_6103_6104, dn_6105_6106, dn_6107_6108, dn_6109_6110, dn_6111_6112, dn_6113_6114, dn_6115_6116, dn_6117_6118, dn_6119_6120, dn_6121_6122, dn_6123_6124, dn_6125_6126, dn_6127_6128, dn_6129_6130, dn_6131_6132, dn_6157_6158, dn_6159_6160, dn_6161_6162, dn_6163_6164, dn_6165_6166, dn_6167_6168, dn_6169_6170, dn_6171_6172, dn_6173_6174, dn_6175_6176, dn_6177_6178, dn_6179_6180, dn_6193_6194, dn_6195_6196, dn_6197_6198, dn_6199_6200, dn_6201_6202, dn_6203_6204, dn_6205_6206, dn_6207_6208, dn_6209_6210, dn_6211_6212, dn_6213_6214, dn_6215_6216, dn_6229_6230, dn_6231_6232, dn_6233_6234, dn_6235_6236, dn_6237_6238, dn_6239_6240, dn_6241_6242, dn_6243_6244, dn_6245_6246, dn_6247_6248, dn_6249_6250, dn_6251_6252, dn_6277_6278, dn_6279_6280, dn_6281_6282, dn_6283_6284, dn_6285_6286, dn_6287_6288, dn_6289_6290, dn_6291_6292, dn_6293_6294, dn_6295_6296, dn_6297_6298, dn_6299_6300
8 --Partitioned CStore Scan on sdifin.hah_ae_line_sr_t_02_8663 event_1u18olr
Output: event_1u18olr.ae_header_id, event_1u18olr.ae_line_num, event_1u18olr.application_code, event_1u18olr.sr1, event_1u18olr.sr2, event_1u18olr.sr3, event_1u18olr.sr4, event_1u18olr.sr5, event_1u18olr.sr6, event_1u18olr.sr7, event_1u18olr.sr8, event_1u18olr.sr9, event_1u18olr.sr10, event_1u18olr.sr11, event_1u18olr.sr12, event_1u18olr.sr13, event_1u18olr.sr14, event_1u18olr.sr15, event_1u18olr.sr16, event_1u18olr.sr17, event_1u18olr.sr18, event_1u18olr.sr19, event_1u18olr.sr20, event_1u18olr.sr21, event_1u18olr.sr22, event_1u18olr.sr23, event_1u18olr.sr24, event_1u18olr.sr25, event_1u18olr.sr26, event_1u18olr.sr27, event_1u18olr.sr28, event_1u18olr.sr29, event_1u18olr.sr30, event_1u18olr.sr31, event_1u18olr.sr32, event_1u18olr.sr33, event_1u18olr.sr34, event_1u18olr.sr35, event_1u18olr.sr36, event_1u18olr.sr37, event_1u18olr.sr38, event_1u18olr.sr39, event_1u18olr.sr40, event_1u18olr.sr41, event_1u18olr.sr42, event_1u18olr.sr43, event_1u18olr.sr44, event_1u18olr.sr45, event_1u18olr.sr46, event_1u18olr.sr47, event_1u18olr.sr48, event_1u18olr.sr49, event_1u18olr.sr50, event_1u18olr.sr51, event_1u18olr.sr52, event_1u18olr.sr53, event_1u18olr.sr54, event_1u18olr.sr55, event_1u18olr.sr56, event_1u18olr.sr57, event_1u18olr.sr58, event_1u18olr.sr59, event_1u18olr.sr60, event_1u18olr.unit_code, event_1u18olr.created_by, event_1u18olr.creation_date, event_1u18olr.last_updated_by, event_1u18olr.last_update_date, event_1u18olr.ss_id, event_1u18olr.del_flag, event_1u18olr.crt_cycle_id, event_1u18olr.last_upd_cycle_id, event_1u18olr.crt_job_instance_id, event_1u18olr.upd_job_instance_id, event_1u18olr.dq_improve_flag, event_1u18olr.last_modified_date, event_1u18olr.ctid, event_1u18olr.xc_node_id, event_1u18olr.tableoid
Distribute Key: event_1u18olr.ae_header_id, event_1u18olr.ae_line_num
Exec Nodes: (LC_DL1) dn_6001_6002, dn_6003_6004, dn_6005_6006, dn_6007_6008, dn_6009_6010, dn_6011_6012, dn_6013_6014, dn_6015_6016, dn_6017_6018, dn_6019_6020, dn_6021_6022, dn_6023_6024, dn_6025_6026, dn_6027_6028, dn_6029_6030, dn_6031_6032, dn_6033_6034, dn_6035_6036, dn_6037_6038, dn_6039_6040, dn_6041_6042, dn_6043_6044, dn_6045_6046, dn_6047_6048, dn_6061_6062, dn_6063_6064, dn_6065_6066, dn_6067_6068, dn_6069_6070, dn_6071_6072, dn_6073_6074, dn_6075_6076, dn_6077_6078, dn_6079_6080, dn_6081_6082, dn_6083_6084, dn_6097_6098, dn_6099_6100, dn_6101_6102, dn_6103_6104, dn_6105_6106, dn_6107_6108, dn_6109_6110, dn_6111_6112, dn_6113_6114, dn_6115_6116, dn_6117_6118, dn_6119_6120, dn_6121_6122, dn_6123_6124, dn_6125_6126, dn_6127_6128, dn_6129_6130, dn_6131_6132, dn_6157_6158, dn_6159_6160, dn_6161_6162, dn_6163_6164, dn_6165_6166, dn_6167_6168, dn_6169_6170, dn_6171_6172, dn_6173_6174, dn_6175_6176, dn_6177_6178, dn_6179_6180, dn_6193_6194, dn_6195_6196, dn_6197_6198, dn_6199_6200, dn_6201_6202, dn_6203_6204, dn_6205_6206, dn_6207_6208, dn_6209_6210, dn_6211_6212, dn_6213_6214, dn_6215_6216, dn_6229_6230, dn_6231_6232, dn_6233_6234, dn_6235_6236, dn_6237_6238, dn_6239_6240, dn_6241_6242, dn_6243_6244, dn_6245_6246, dn_6247_6248, dn_6249_6250, dn_6251_6252, dn_6277_6278, dn_6279_6280, dn_6281_6282, dn_6283_6284, dn_6285_6286, dn_6287_6288, dn_6289_6290, dn_6291_6292, dn_6293_6294, dn_6295_6296, dn_6297_6298, dn_6299_6300
====== Query Summary =====
--------------------------------
System available mem: 10485760KB
Query Max mem: 10485760KB
Query estimated mem: 10485760KB
从 topSQL 中提取执行信息,发现 MERGE 之前的重分布(Streaming(type: REDISTRIBUTE))耗时达到 800s
1 | Row Adapter (cost=612428509.39..612428509.39 rows=1 width=31463) (actual time=2045643.107..2045643.107 rows=0 loops=1)
2 | ->Vector Streaming (type: GATHER) (cost=14170315.35..612428509.39 rows=1 width=31463) (actual time=2045643.077..2045643.077 rows=0 loops=1)
| Node/s: (GenGroup) dn_6001_6002, dn_6003_6004, dn_6005_6006, dn_6007_6008, dn_6009_6010, dn_6011_6012, dn_6013_6014, dn_6015_6016, dn_6017_6018, dn_6019_6020, dn_6021_6022, dn_6023_6024, dn_6025_6026, dn_6027_6028, dn_6029_6030, dn_6031_6032, dn_6033_6034, dn_6035_6036, dn_6037_6038, dn_6039_6040, dn_6041_6042, dn_6043_6044, dn_6045_6046, dn_6047_6048, dn_6061_6062, dn_6063_6064, dn_6065_6066, dn_6067_6068, dn_6069_6070, dn_6071_6072, dn_6073_6074, dn_6075_6076, dn_6077_6078, dn_6079_6080, dn_6081_6082, dn_6083_6084, dn_6097_6098, dn_6099_6100, dn_6101_6102, dn_6103_6104, dn_6105_6106, dn_6107_6108, dn_6109_6110, dn_6111_6112, dn_6113_6114, dn_6115_6116, dn_6117_6118, dn_6119_6120, dn_6121_6122, dn_6123_6124, dn_6125_6126, dn_6127_6128, dn_6129_6130, dn_6131_6132, dn_6157_6158, dn_6159_6160, dn_6161_6162, dn_6163_6164, dn_6165_6166, dn_6167_6168, dn_6169_6170, dn_6171_6172, dn_6173_6174, dn_6175_6176, dn_6177_6178, dn_6179_6180, dn_6193_6194, dn_6195_6196, dn_6197_6198, dn_6199_6200, dn_6201_6202, dn_6203_6204, dn_6205_6206, dn_6207_6208, dn_6209_6210, dn_6211_6212, dn_6213_6214, dn_6215_6216, dn_6229_6230, dn_6231_6232, dn_6233_6234, dn_6235_6236, dn_6237_6238, dn_6239_6240, dn_6241_6242, dn_6243_6244, dn_6245_6246, dn_6247_6248, dn_6249_6250, dn_6251_6252, dn_6277_6278, dn_6279_6280, dn_6281_6282, dn_6283_6284, dn_6285_6286, dn_6287_6288, dn_6289_6290, dn_6291_6292, dn_6293_6294, dn_6295_6296, dn_6297_6298, dn_6299_6300
3 | ->Vector Merge on sdifin.hah_ae_line_sr_t_02_8663 event_1u18olr (cost=14170311.35..612427718.21 rows=409569519 width=31463) (actual time=[15613.983,2041873.584]..[25854.129,2045592.993], rows=372335926)
| Merge Inserted: 18521227
| Merge Updated: 353814699
4 | ->Vector Streaming(type: REDISTRIBUTE) (cost=14170311.35..612427718.21 rows=409569519 width=31463) (actual time=[15255.555,43712.838]..[25089.826,801718.915], rows=372335926)
| Distribute Key: (CASE WHEN (event_1u18olr.ctid IS NULL) THEN dlt_hah_ae_line_sr_t_02_8663.ae_header_id ELSE event_1u18olr.ae_header_id END), (CASE WHEN (event_1u18olr.ctid IS NULL) THEN dlt_hah_ae_line_sr_t_02_8663.ae_line_num ELSE event_1u18olr.ae_line_num END)
| Spawn on: (LC_DL1) dn_6001_6002, dn_6003_6004, dn_6005_6006, dn_6007_6008, dn_6009_6010, dn_6011_6012, dn_6013_6014, dn_6015_6016, dn_6017_6018, dn_6019_6020, dn_6021_6022, dn_6023_6024, dn_6025_6026, dn_6027_6028, dn_6029_6030, dn_6031_6032, dn_6033_6034, dn_6035_6036, dn_6037_6038, dn_6039_6040, dn_6041_6042, dn_6043_6044, dn_6045_6046, dn_6047_6048, dn_6061_6062, dn_6063_6064, dn_6065_6066, dn_6067_6068, dn_6069_6070, dn_6071_6072, dn_6073_6074, dn_6075_6076, dn_6077_6078, dn_6079_6080, dn_6081_6082, dn_6083_6084, dn_6097_6098, dn_6099_6100, dn_6101_6102, dn_6103_6104, dn_6105_6106, dn_6107_6108, dn_6109_6110, dn_6111_6112, dn_6113_6114, dn_6115_6116, dn_6117_6118, dn_6119_6120, dn_6121_6122, dn_6123_6124, dn_6125_6126, dn_6127_6128, dn_6129_6130, dn_6131_6132, dn_6157_6158, dn_6159_6160, dn_6161_6162, dn_6163_6164, dn_6165_6166, dn_6167_6168, dn_6169_6170, dn_6171_6172, dn_6173_6174, dn_6175_6176, dn_6177_6178, dn_6179_6180, dn_6193_6194, dn_6195_6196, dn_6197_6198, dn_6199_6200, dn_6201_6202, dn_6203_6204, dn_6205_6206, dn_6207_6208, dn_6209_6210, dn_6211_6212, dn_6213_6214, dn_6215_6216, dn_6229_6230, dn_6231_6232, dn_6233_6234, dn_6235_6236, dn_6237_6238, dn_6239_6240, dn_6241_6242, dn_6243_6244, dn_6245_6246, dn_6247_6248, dn_6249_6250, dn_6251_6252, dn_6277_6278, dn_6279_6280, dn_6281_6282, dn_6283_6284, dn_6285_6286, dn_6287_6288, dn_6289_6290, dn_6291_6292, dn_6293_6294, dn_6295_6296, dn_6297_6298, dn_6299_6300
5 | ->Vector Hash Left Join (6, 7) (cost=14170311.35..550579543.56 rows=409569519 width=31463) (actual time=[15238.705,35630.058]..[25063.978,56755.481], rows=372335926)
| Hash Cond: (((dlt_hah_ae_line_sr_t_02_8663.ae_header_id)::text = (event_1u18olr.ae_header_id)::text) AND (dlt_hah_ae_line_sr_t_02_8663.ae_line_num = event_1u18olr.ae_line_num))
Max File Num: 32
Min File Num: 32
6 | ->CStore Scan on stgfin.dlt_hah_ae_line_sr_t_02_8663 (cost=0.00..254707.99 rows=372335926 distinct=265738.00 width=15428) (actual time=[19.572,2315.441]..[69.384,4136.335], rows=372335926)
| Distribute Key: dlt_hah_ae_line_sr_t_02_8663.ae_header_id, dlt_hah_ae_line_sr_t_02_8663.ae_line_num
7 | ->Vector Partition Iterator (cost=0.00..226253.77 rows=353814699 distinct=405193.00 width=15979) (actual time=[20.569,1834.378]..[102.897,2892.615], rows=353814699)
| Iterations: 20
8 | ->Partitioned CStore Scan on sdifin.hah_ae_line_sr_t_02_8663 event_1u18olr (cost=0.00..226253.77 rows=353814699 width=15979) (actual time=[163.175,1815.713]..[399.176,2859.094], rows=353814699)
| Distribute Key: event_1u18olr.ae_header_id, event_1u18olr.ae_line_num
| Partitions Selected by Static Prune: 1..20
查看两个表的结构,发现表结构一致
【优化建议】
把 MERGE 语句拆分为 UPDATE 和 INSERT 两个分析的结果集独立往目标表插入。因为如上用例列数太多,构造比较麻烦,使用如下用例做演示
原始 MERGE 语句
改写后的语句
改写后语句的执行计划
UNION ALL 上面分支关联时,只读取 public.t 上的非更新列列 a 和 d
UNION ALL 下面分支关联时,只用读取 public.t 上的关联列列 a
INSERT 下面查询语句各个部分的结果集的宽度都和表 tmp、t 的宽度基本保持一致
版权声明: 本文为 InfoQ 作者【华为云开发者联盟】的原创文章。
原文链接:【http://xie.infoq.cn/article/4c739bf5d1f123b22bfe3770c】。文章转载请联系作者。
华为云开发者联盟
提供全面深入的云计算技术干货 2020-07-14 加入
生于云,长于云,让开发者成为决定性力量
评论