Left Join(四)
0.143 ms to first row, 0.145 ms to end, start offset by 721 ms.
Slice statistics:
(slice0) Executor memory: 332K bytes.
(slice1) Executor memory: 581K bytes avg x 64 workers, 4353K bytes max (seg42). Work_mem: 74K bytes max.
Statement statistics:
Memory used: 128000K bytes
Total runtime: 725.316 ms
(27 rows)
bigdatagp=# explain analyze select * from tgt1 a left join tgt2 b on a.id=b.id where a.id>=6 order by a.id;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------
Gather Motion 64:1 (slice1; segments: 64) (cost=7.17..7.18 rows=1 width=14)
Merge Key: "?column5?"
Rows out: (No row requested) 0 rows at destination with 6.536 ms to end, start offset by 1.097 ms.
-> Sort (cost=7.17..7.18 rows=1 width=14)
Sort Key: a.id
Rows out: (No row requested) 0 rows (seg0) with 0 ms to end.
Executor memory: 33K bytes avg, 33K bytes max (seg0).
Work_mem used: 33K bytes avg, 33K bytes max (seg0). Workfile: (0 spilling, 0 reused)
-> Hash Left Join (cost=2.04..7.15 rows=1 width=14)
Hash Cond: a.id = b.id
Rows out: (No row requested) 0 rows (seg0) with 0 ms to end.
-> Seq Scan on tgt1 a (cost=0.00..5.06 rows=1 width=7)
Filter: id >= 6
Rows out: (No row requested) 0 rows (seg0) with 0 ms to end.
-> Hash (cost=2.02..2.02 rows=1 width=7)
Rows in: (No row requested) 0 rows (seg0) with 0 ms to end.
-> Seq Scan on tgt2 b (cost=0.00..2.02 rows=1 width=7)
Rows out: (No row requested) 0 rows (seg0) with 0 ms to end.
Slice statistics:
(slice0) Executor memory: 332K bytes.
(slice1) Executor memory: 225K bytes avg x 64 workers, 225K bytes max (seg0). Work_mem: 33K bytes max.
Statement statistics:
Memory used: 128000K bytes
Total runtime: 8.615 ms
(24 rows)
bigdatagp=# explain analyze select * from tgt1 a left join tgt2 b on a.id=b.id and a.id>
=6 order by a.id;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------
Gather Motion 64:1 (slice1; segments: 64) (cost=7.23..7.24 rows=1 width=14)
Merge Key: "?column5?"
Rows out: 5 rows at destination with 115 ms to end, start offset by 1.195 ms.
-> Sort (cost=7.23..7.24 rows=1 width=14)
Sort Key: a.id
Rows out: Avg 1.0 rows x 5 workers. Max 1 rows (seg42) with 6.979 ms to first row, 6.980 ms to end, start offset by 12 ms.
Executor memory: 72K bytes avg, 74K bytes max (seg0).
Work_mem used: 72K bytes avg, 74K bytes max (seg0). Workfile: (0 spilling, 0 reused)
-> Hash Left Join (cost=2.04..7.17 rows=1 width=14)
Hash Cond: a.id = b.id
Join Filter: a.id >= 6
Rows out: Avg 1.0 rows x 5 workers. Max 1 rows (seg42) with 5.570 ms to first row, 6.157 ms to end, start offset by 12 ms.
Executor memory: 1K bytes avg, 1K bytes max (seg42).
Work_mem used: 1K bytes avg, 1K bytes max (seg42). Workfile: (0 spilling, 0 reused)
(seg42) Hash chain length 1.0 avg, 1 max, using 1 of 262151 buckets.
-> Seq Scan on tgt1 a (cost=0.00..5.05 rows=1 width=7)
Rows out: Avg 1.0 rows x 5 workers. Max 1 rows (seg42) with 0.050 ms to first row, 0.051 ms to end, start offset by 12 ms.
-> Hash (cost=2.02..2.02 rows=1 width=7)
Rows in: Avg 1.0 rows x 2 workers. Max 1 rows (seg42) with 0.153 ms to end, start offset by 18 ms.
-> Seq Scan on tgt2 b (cost=0.00..2.02 rows=1 width=7)
Ro