explain WITH data as (
SELECT scan_id,scan_date_time, defect_id from DEFECT_DATA )
select * from DEFECT_WAFER dw join data on dw.scan_id = data.scan_id and dw.scan_date_time=data.scan_date_time
WHERE dw.scan_date_time in (‘2023-08-20 22:33:41’, ‘2021-10-17 10:30:27’) AND
dw.scan_id in (500007,500008) ;
PLAN FRAGMENT 0
OUTPUT EXPRS:38: scan_id | 39: scan_date_time | 40: lot_id | 41: wafer_no | 42: test_no | 43: technology | 44: fab_id | 45: comments | 46: wafer_size | 47: step_id | 48: device_id | 49: slot_id | 50: wafer_mark_type | 51: wafer_mark_location | 52: process_equip_id | 53: inspect_prog_id | 54: inspect_equip_manufacturer | 55: inspect_equip_group | 56: inspect_equip_id | 57: total_scan_area | 58: total_die_tested | 59: setup_id | 60: setup_datetime | 61: image_count | 62: scan_sequence | 63: review_status | 64: last_modified_time | 65: adder_all_defects | 66: adder_random_defects | 67: adder_cluster_count | 68: all_defects | 69: random_defects | 70: cluster_count | 71: adder_defective_die | 72: adder_random_defective_die | 73: adder_cluster_defective_die | 74: defective_die | 75: random_defective_die | 76: cluster_defective_die | 77: test_plan | 78: classified_defect_count | 79: adder_classified_defect_count | 80: defects_withimage | 81: repeater_defect_count | 82: repeater_count | 83: x_origin | 84: y_origin | 85: x_die_size | 86: y_die_size | 87: x_die_pitch | 88: y_die_pitch | 89: x_alignment1 | 90: y_alignment1 | 91: x_alignment2 | 92: y_alignment2 | 93: x_alignment3 | 94: y_alignment3 | 95: x_alignment4 | 96: y_alignment4 | 97: x_alignment5 | 98: y_alignment5 | 99: polymerization_time | 100: load_time | 101: scan_id | 103: scan_date_time | 102: defect_id
PARTITION: UNPARTITIONED
RESULT SINK
5:EXCHANGE
limit: 200
PLAN FRAGMENT 1
OUTPUT EXPRS:
PARTITION: HASH_PARTITIONED: 38: scan_id, 39: scan_date_time
STREAM DATA SINK
EXCHANGE ID: 05
UNPARTITIONED
4:HASH JOIN
| join op: INNER JOIN (PARTITIONED)
| colocate: false, reason:
| equal join conjunct: 38: scan_id = 101: scan_id
| equal join conjunct: 39: scan_date_time = 103: scan_date_time
| limit: 200
|
|----3:EXCHANGE
|
1:EXCHANGE
PLAN FRAGMENT 2
OUTPUT EXPRS:
PARTITION: RANDOM
STREAM DATA SINK
EXCHANGE ID: 03
HASH_PARTITIONED: 101: scan_id, 103: scan_date_time
2:OlapScanNode
TABLE: DEFECT_DATA
PREAGGREGATION: ON
PREDICATES: 101: scan_id IN (500007, 500008), 103: scan_date_time IN (‘2023-08-20 22:33:41’, ‘2021-10-17 10:30:27’)
partitions=2/7
rollup: DEFECT_DATA
tabletRatio=2/6
tabletList=3520426,3520398
cardinality=422
avgRowSize=20.0
numNodes=0
PLAN FRAGMENT 3
OUTPUT EXPRS:
PARTITION: RANDOM
STREAM DATA SINK
EXCHANGE ID: 01
HASH_PARTITIONED: 38: scan_id, 39: scan_date_time
0:OlapScanNode
TABLE: DEFECT_WAFER
PREAGGREGATION: ON
PREDICATES: 39: scan_date_time IN (‘2023-08-20 22:33:41’, ‘2021-10-17 10:30:27’), 38: scan_id IN (500007, 500008)
partitions=2/8
rollup: DEFECT_WAFER
tabletRatio=2/4
tabletList=3520351,3520379
cardinality=1
avgRowSize=310.07693
numNodes=0