explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Lnx2

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=46,881.43..46,881.53 rows=5 width=198) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Gather Motion 4:1 (slice10; segments: 4) (cost=46,881.43..46,881.53 rows=5 width=198) (actual rows= loops=)

  • Merge Key: public.supplier.s_acctbal, public.nation.n_name, public.supplier.s_name, part.p_partkey
3. 0.000 0.000 ↓ 0.0

Limit (cost=46,881.43..46,881.44 rows=2 width=198) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Sort (cost=46,881.43..46,881.44 rows=2 width=198) (actual rows= loops=)

  • Sort Key (Limit): public.supplier.s_acctbal, public.nation.n_name, public.supplier.s_name, part.p_partkey
5. 0.000 0.000 ↓ 0.0

Hash Join (cost=42,481.34..46,881.39 rows=2 width=198) (actual rows= loops=)

  • Hash Cond: "Expr_SUBQUERY".csq_c0 = part.p_partkey AND "Expr_SUBQUERY".csq_c1 = public.partsupp.ps_supplycost
6. 0.000 0.000 ↓ 0.0

HashAggregate (cost=23,828.08..25,828.08 rows=40,000 width=40) (actual rows= loops=)

  • Group By: public.partsupp.ps_partkey
7. 0.000 0.000 ↓ 0.0

Redistribute Motion 4:4 (slice4; segments: 4) (cost=18,228.08..21,428.08 rows=40,000 width=40) (actual rows= loops=)

  • Hash Key: public.partsupp.ps_partkey
8. 0.000 0.000 ↓ 0.0

HashAggregate (cost=18,228.08..18,228.08 rows=40,000 width=40) (actual rows= loops=)

  • Group By: public.partsupp.ps_partkey
9. 0.000 0.000 ↓ 0.0

Hash Join (cost=423.08..17,428.08 rows=40,001 width=16) (actual rows= loops=)

  • Hash Cond: public.partsupp.ps_suppkey = public.supplier.s_suppkey
10. 0.000 0.000 ↓ 0.0

Append-only Columnar Scan on partsupp (cost=0.00..11,805.00 rows=200,000 width=24) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash (cost=323.08..323.08 rows=2,001 width=8) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Broadcast Motion 4:4 (slice3; segments: 4) (cost=9.08..323.08 rows=2,001 width=8) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash Join (cost=9.08..223.08 rows=501 width=8) (actual rows= loops=)

  • Hash Cond: public.supplier.s_nationkey = public.nation.n_nationkey
14. 0.000 0.000 ↓ 0.0

Append-only Columnar Scan on supplier (cost=0.00..149.00 rows=2,500 width=16) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash (cost=8.83..8.83 rows=6 width=8) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Broadcast Motion 4:4 (slice2; segments: 4) (cost=4.16..8.83 rows=6 width=8) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Hash Join (cost=4.16..8.58 rows=2 width=8) (actual rows= loops=)

  • Hash Cond: public.nation.n_regionkey = public.region.r_regionkey
18. 0.000 0.000 ↓ 0.0

Append-only Columnar Scan on nation (cost=0.00..4.25 rows=7 width=16) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Hash (cost=4.11..4.11 rows=2 width=8) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Broadcast Motion 4:4 (slice1; segments: 4) (cost=0.00..4.11 rows=2 width=8) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Append-only Columnar Scan on region (cost=0.00..4.06 rows=1 width=8) (actual rows= loops=)

  • Filter: r_name = 'AFRICA'::bpchar
22. 0.000 0.000 ↓ 0.0

Hash (cost=18,623.96..18,623.96 rows=489 width=214) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Redistribute Motion 4:4 (slice9; segments: 4) (cost=4,340.29..18,623.96 rows=489 width=214) (actual rows= loops=)

  • Hash Key: part.p_partkey
24. 0.000 0.000 ↓ 0.0

Hash Join (cost=4,340.29..18,584.88 rows=489 width=214) (actual rows= loops=)

  • Hash Cond: public.partsupp.ps_suppkey = public.supplier.s_suppkey
25. 0.000 0.000 ↓ 0.0

Redistribute Motion 4:4 (slice6; segments: 4) (cost=4,092.22..18,287.96 rows=2,443 width=58) (actual rows= loops=)

  • Hash Key: public.partsupp.ps_suppkey
26. 0.000 0.000 ↓ 0.0

Hash Join (cost=4,092.22..18,092.59 rows=2,443 width=58) (actual rows= loops=)

  • Hash Cond: public.partsupp.ps_partkey = part.p_partkey
27. 0.000 0.000 ↓ 0.0

Append-only Columnar Scan on partsupp (cost=0.00..11,805.00 rows=200,000 width=24) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Hash (cost=3,970.11..3,970.11 rows=2,443 width=34) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Broadcast Motion 4:4 (slice5; segments: 4) (cost=0.00..3,970.11 rows=2,443 width=34) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Append-only Columnar Scan on part (cost=0.00..3,848.00 rows=611 width=34) (actual rows= loops=)

  • Filter: p_size = 6 AND p_type::text ~~ '%COPPER'::text
31. 0.000 0.000 ↓ 0.0

Hash (cost=223.08..223.08 rows=501 width=172) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Hash Join (cost=9.08..223.08 rows=501 width=172) (actual rows= loops=)

  • Hash Cond: public.supplier.s_nationkey = public.nation.n_nationkey
33. 0.000 0.000 ↓ 0.0

Append-only Columnar Scan on supplier (cost=0.00..149.00 rows=2,500 width=154) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Hash (cost=8.83..8.83 rows=6 width=34) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Broadcast Motion 4:4 (slice8; segments: 4) (cost=4.16..8.83 rows=6 width=34) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Hash Join (cost=4.16..8.58 rows=2 width=34) (actual rows= loops=)

  • Hash Cond: public.nation.n_regionkey = public.region.r_regionkey
37. 0.000 0.000 ↓ 0.0

Append-only Columnar Scan on nation (cost=0.00..4.25 rows=7 width=42) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Hash (cost=4.11..4.11 rows=2 width=8) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Broadcast Motion 4:4 (slice7; segments: 4) (cost=0.00..4.11 rows=2 width=8) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Append-only Columnar Scan on region (cost=0.00..4.06 rows=1 width=8) (actual rows= loops=)

  • Filter: r_name = 'AFRICA'::bpchar