explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EZG : q2-p2y

Settings
# exclusive inclusive rows x rows loops node
1. 34.951 109.170 ↓ 2.0 100 1

Nested Loop (cost=64.41..8,874.03 rows=50 width=268) (actual time=2.824..109.170 rows=100 loops=1)

2. 0.298 70.719 ↓ 2.0 100 1

Hash Join (cost=64.15..8,770.76 rows=50 width=236) (actual time=1.518..70.719 rows=100 loops=1)

  • Hash Cond: (j.tuidout = j_1.tuidinout)
3. 0.545 70.349 ↑ 1.2 460 1

Nested Loop (cost=60.65..8,764.69 rows=551 width=236) (actual time=1.202..70.349 rows=460 loops=1)

4. 0.437 22.884 ↑ 1.2 460 1

Nested Loop (cost=32.07..8,725.10 rows=551 width=483) (actual time=0.622..22.884 rows=460 loops=1)

  • Join Filter: (j.tuid5 = r.tuid)
  • Rows Removed by Join Filter: 1840
5. 0.475 21.987 ↑ 1.2 460 1

Hash Join (cost=32.07..8,682.71 rows=551 width=437) (actual time=0.611..21.987 rows=460 loops=1)

  • Hash Cond: (j.tuid4 = n.tuid)
6. 0.532 21.495 ↑ 1.2 460 1

Nested Loop (cost=30.51..8,673.57 rows=551 width=366) (actual time=0.581..21.495 rows=460 loops=1)

7. 0.633 12.683 ↑ 1.2 460 1

Nested Loop (cost=30.08..4,296.25 rows=551 width=295) (actual time=0.536..12.683 rows=460 loops=1)

8. 1.294 3.310 ↑ 1.2 460 1

Hash Join (cost=29.66..461.67 rows=551 width=195) (actual time=0.468..3.310 rows=460 loops=1)

  • Hash Cond: (s.tuid = j.tuid2)
9. 1.575 1.575 ↑ 1.0 10,000 1

Seq Scan on supplier_2 s (cost=0.00..364.00 rows=10,000 width=179) (actual time=0.003..1.575 rows=10,000 loops=1)

10. 0.116 0.441 ↑ 1.2 460 1

Hash (cost=22.77..22.77 rows=551 width=24) (actual time=0.441..0.441 rows=460 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 34kB
11. 0.325 0.325 ↑ 1.2 460 1

Seq Scan on join5 j (cost=0.00..22.77 rows=551 width=24) (actual time=0.007..0.325 rows=460 loops=1)

  • Filter: ((location)::integer = (2)::integer)
  • Rows Removed by Filter: 642
12. 8.740 8.740 ↑ 1.0 1 460

Index Scan using part_2_pkey on part_2 p (cost=0.42..6.95 rows=1 width=104) (actual time=0.019..0.019 rows=1 loops=460)

  • Index Cond: (tuid = j.tuid1)
13. 8.280 8.280 ↑ 1.0 1 460

Index Scan using partsupp_2_pkey on partsupp_2 ps (cost=0.42..7.93 rows=1 width=79) (actual time=0.017..0.018 rows=1 loops=460)

  • Index Cond: (tuid = j.tuid3)
14. 0.010 0.017 ↑ 1.0 25 1

Hash (cost=1.25..1.25 rows=25 width=79) (actual time=0.017..0.017 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
15. 0.007 0.007 ↑ 1.0 25 1

Seq Scan on nation_2 n (cost=0.00..1.25 rows=25 width=79) (actual time=0.003..0.007 rows=25 loops=1)

16. 0.458 0.460 ↑ 1.0 5 460

Materialize (cost=0.00..1.07 rows=5 width=54) (actual time=0.000..0.001 rows=5 loops=460)

17. 0.002 0.002 ↑ 1.0 5 1

Seq Scan on region_2 r (cost=0.00..1.05 rows=5 width=54) (actual time=0.002..0.002 rows=5 loops=1)

18. 8.740 46.920 ↑ 1.0 1 460

Function Scan on toy _y_1 (cost=28.58..28.59 rows=1 width=32) (actual time=0.102..0.102 rows=1 loops=460)

19.          

SubPlan (for Function Scan)

20. 12.420 38.180 ↑ 1.0 1 460

Aggregate (cost=28.04..28.30 rows=1 width=57) (actual time=0.083..0.083 rows=1 loops=460)

21. 1.046 25.760 ↑ 1.0 1 460

Nested Loop (cost=1.26..28.03 rows=1 width=57) (actual time=0.038..0.056 rows=1 loops=460)

22. 1.198 13.800 ↑ 1.0 1 460

Nested Loop (cost=0.99..27.74 rows=1 width=225) (actual time=0.019..0.030 rows=1 loops=460)

  • Join Filter: (j_2.tuid5 = r2.tuid)
  • Rows Removed by Join Filter: 6
23. 2.674 11.960 ↑ 1.0 1 460

Nested Loop (cost=0.99..26.63 rows=1 width=179) (actual time=0.016..0.026 rows=1 loops=460)

  • Join Filter: (j_2.tuid4 = n2.tuid)
  • Rows Removed by Join Filter: 33
24. 0.834 7.360 ↑ 1.0 1 460

Nested Loop (cost=0.99..25.06 rows=1 width=133) (actual time=0.011..0.016 rows=1 loops=460)

25. 0.374 4.600 ↑ 1.0 1 460

Nested Loop (cost=0.70..16.75 rows=1 width=87) (actual time=0.007..0.010 rows=1 loops=460)

26. 2.300 2.300 ↑ 1.0 1 460

Index Only Scan using join5_pkey on join5 j_2 (cost=0.28..8.30 rows=1 width=16) (actual time=0.004..0.005 rows=1 loops=460)

  • Index Cond: ((location = (3)::integer) AND (tuid1 = p.tuid))
  • Heap Fetches: 642
27. 1.926 1.926 ↑ 1.0 1 642

Index Scan using partsupp_2_pkey on partsupp_2 ps2 (cost=0.42..8.44 rows=1 width=79) (actual time=0.002..0.003 rows=1 loops=642)

  • Index Cond: (tuid = j_2.tuid2)
28. 1.926 1.926 ↑ 1.0 1 642

Index Scan using supplier_2_pkey on supplier_2 s2 (cost=0.29..8.30 rows=1 width=54) (actual time=0.003..0.003 rows=1 loops=642)

  • Index Cond: (tuid = j_2.tuid3)
29. 1.926 1.926 ↑ 1.0 25 642

Seq Scan on nation_2 n2 (cost=0.00..1.25 rows=25 width=54) (actual time=0.001..0.003 rows=25 loops=642)

30. 0.642 0.642 ↑ 1.0 5 642

Seq Scan on region_2 r2 (cost=0.00..1.05 rows=5 width=54) (actual time=0.001..0.001 rows=5 loops=642)

31. 10.914 10.914 ↑ 1.0 1 642

Function Scan on toy _y_2 (cost=0.27..0.28 rows=1 width=32) (actual time=0.017..0.017 rows=1 loops=642)

32. 0.022 0.072 ↑ 1.0 100 1

Hash (cost=2.25..2.25 rows=100 width=4) (actual time=0.072..0.072 rows=100 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
33. 0.050 0.050 ↑ 1.0 100 1

Seq Scan on join1 j_1 (cost=0.00..2.25 rows=100 width=4) (actual time=0.029..0.050 rows=100 loops=1)

  • Filter: ((location)::integer = (1)::integer)
34. 3.500 3.500 ↑ 1.0 1 100

Function Scan on toy _y (cost=0.27..0.28 rows=1 width=32) (actual time=0.035..0.035 rows=1 loops=100)

Planning time : 13.257 ms
Execution time : 109.680 ms