explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Md8P : Optimization for: test; plan #m4Iv

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.102 21.077 ↓ 3.0 3 1

Nested Loop (cost=3.00..893.55 rows=1 width=32) (actual time=6.023..21.077 rows=3 loops=1)

  • Join Filter: ((n.co_id = rtpezocoav.co_id) AND (n.br_id = sh.br_id) AND (n.re_id = rere.re_id))
  • Rows Removed by Join Filter: 942
2. 0.001 0.019 ↑ 1.0 1 1

Nested Loop (cost=0.71..16.77 rows=1 width=38) (actual time=0.018..0.019 rows=1 loops=1)

3. 0.008 0.008 ↑ 1.0 1 1

Index Scan using idx_calc_nodes_sepeco on calc_nodes n (cost=0.29..8.30 rows=1 width=33) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: ((se_id = 1) AND (pe_id = 68))
4. 0.010 0.010 ↑ 1.0 1 1

Index Scan using rtsepezobrav_unique on rtsepezobrav com (cost=0.42..8.45 rows=1 width=21) (actual time=0.009..0.010 rows=1 loops=1)

  • Index Cond: ((se_id = 1) AND (pe_id = 68) AND (zo_id = n.zo_id) AND (br_id = n.br_id) AND (ad_id = 64))
5. 0.101 20.956 ↓ 945.0 945 1

Nested Loop (cost=2.29..876.72 rows=1 width=81) (actual time=5.990..20.956 rows=945 loops=1)

6. 3.082 20.660 ↓ 15.0 15 1

Nested Loop (cost=2.29..871.20 rows=1 width=60) (actual time=5.985..20.660 rows=15 loops=1)

  • Join Filter: (calc_zones.zo_id = rtpezocoav.zo_id)
  • Rows Removed by Join Filter: 60930
7. 0.007 0.007 ↓ 3.0 3 1

Index Scan using rtpezocoav_unique on rtpezocoav (cost=0.56..6.86 rows=1 width=12) (actual time=0.006..0.007 rows=3 loops=1)

  • Index Cond: ((pe_id = 68) AND (ad_id = 12))
  • Filter: (value_num < '10'::numeric)
8. 7.213 17.571 ↓ 4,063.0 20,315 3

Hash Join (cost=1.73..864.27 rows=5 width=56) (actual time=0.538..5.857 rows=20,315 loops=3)

  • Hash Cond: (calc_zones.re_id = rere.re2_id)
9. 0.708 10.344 ↓ 4.0 4,063 3

Append (cost=0.28..858.96 rows=1,017 width=16) (actual time=0.532..3.448 rows=4,063 loops=3)

10. 0.006 0.006 ↓ 0.0 0 3

Index Scan using idx_calc_zones_sepezo on calc_zones (cost=0.28..6.05 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=3)

  • Index Cond: ((se_id = 1) AND (pe_id = 68))
11. 0.855 9.630 ↓ 4.0 4,063 3

Subquery Scan on *SELECT* 2 (cost=455.46..852.91 rows=1,016 width=16) (actual time=0.529..3.210 rows=4,063 loops=3)

12. 4.215 8.775 ↓ 4.0 4,063 3

Hash Join (cost=455.46..842.75 rows=1,016 width=820) (actual time=0.528..2.925 rows=4,063 loops=3)

  • Hash Cond: (av.pe_id = rtpe.baseline_id)
13. 2.993 4.554 ↓ 2.0 8,126 3

Seq Scan on calc_zones av (cost=454.40..816.29 rows=4,063 width=16) (actual time=0.525..1.518 rows=8,126 loops=3)

  • Filter: ((NOT (hashed SubPlan 1)) AND (se_id = 1))
14.          

SubPlan (forSeq Scan)

15. 0.663 1.561 ↓ 0.0 0 1

Hash Join (cost=1.09..434.08 rows=8,126 width=4) (actual time=1.561..1.561 rows=0 loops=1)

  • Hash Cond: (av_1.pe_id = rtpe_1.id)
16. 0.895 0.895 ↑ 1.0 8,126 1

Seq Scan on calc_zones av_1 (cost=0.00..321.26 rows=8,126 width=8) (actual time=0.001..0.895 rows=8,126 loops=1)

17. 0.000 0.003 ↑ 2.0 2 1

Hash (cost=1.04..1.04 rows=4 width=4) (actual time=0.003..0.003 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 0.003 0.003 ↑ 2.0 2 1

Seq Scan on rtpe rtpe_1 (cost=0.00..1.04 rows=4 width=4) (actual time=0.002..0.003 rows=2 loops=1)

  • Filter: (baseline_id IS NOT NULL)
  • Rows Removed by Filter: 2
19. 0.001 0.006 ↑ 1.0 1 1

Hash (cost=1.05..1.05 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
20. 0.005 0.005 ↑ 1.0 1 1

Seq Scan on rtpe (cost=0.00..1.05 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=1)

  • Filter: (id = 68)
  • Rows Removed by Filter: 3
21. 0.003 0.014 ↓ 25.0 25 1

Hash (cost=1.44..1.44 rows=1 width=48) (actual time=0.014..0.014 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
22. 0.011 0.011 ↓ 25.0 25 1

Seq Scan on rtseperereav rere (cost=0.00..1.44 rows=1 width=48) (actual time=0.006..0.011 rows=25 loops=1)

  • Filter: ((pe_id = 68) AND (se_id = 1) AND (ad_id = 65))
  • Rows Removed by Filter: 25
23. 0.195 0.195 ↑ 1.0 63 15

Seq Scan on calc_shopconcepts sh (cost=0.00..4.89 rows=63 width=21) (actual time=0.001..0.013 rows=63 loops=15)

  • Filter: ((pe_id = 68) AND (se_id = 1))
  • Rows Removed by Filter: 63