explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Tl1l

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 12.049 ↑ 93.3 3 1

WindowAgg (cost=4,544.81..4,556.01 rows=280 width=12) (actual time=12.044..12.049 rows=3 loops=1)

2. 0.006 12.039 ↑ 93.3 3 1

Sort (cost=4,544.81..4,545.51 rows=280 width=45) (actual time=12.038..12.039 rows=3 loops=1)

  • Sort Key: f.zoneid
  • Sort Method: quicksort Memory: 25kB
3. 0.005 12.033 ↑ 93.3 3 1

Hash Join (cost=2,921.83..4,533.43 rows=280 width=45) (actual time=11.555..12.033 rows=3 loops=1)

  • Hash Cond: (f.zoneid = calc_zones.zo_id)
4. 0.009 6.261 ↑ 18.3 3 1

WindowAgg (cost=2,050.16..3,651.26 rows=55 width=20) (actual time=5.783..6.261 rows=3 loops=1)

5. 0.015 6.252 ↑ 18.3 3 1

Subquery Scan on f (cost=2,050.16..3,648.78 rows=55 width=36) (actual time=5.774..6.252 rows=3 loops=1)

  • Filter: (f.ownerid = f.to_owner)
  • Rows Removed by Filter: 186
6. 0.406 6.237 ↑ 58.3 189 1

WindowAgg (cost=2,050.16..3,510.97 rows=11,025 width=44) (actual time=5.681..6.237 rows=189 loops=1)

7. 0.014 5.831 ↑ 58.3 189 1

Subquery Scan on v (cost=2,050.16..2,794.34 rows=11,025 width=69) (actual time=5.664..5.831 rows=189 loops=1)

  • Filter: ((v.r <= '10'::numeric) OR (v.nd_attraction > '1.00000000000000008e-05'::double precision))
8. 0.139 5.817 ↑ 105.0 189 1

WindowAgg (cost=2,050.16..2,496.67 rows=19,845 width=73) (actual time=5.662..5.817 rows=189 loops=1)

9. 0.069 5.678 ↑ 105.0 189 1

Sort (cost=2,050.16..2,099.77 rows=19,845 width=37) (actual time=5.655..5.678 rows=189 loops=1)

  • Sort Key: ic.br2_id, ca.zo_id, ca.attraction DESC
  • Sort Method: quicksort Memory: 39kB
10. 0.023 5.609 ↑ 105.0 189 1

Hash Join (cost=267.62..633.57 rows=19,845 width=37) (actual time=5.591..5.609 rows=189 loops=1)

  • Hash Cond: (ca.br_id = ic.br_id)
11. 3.522 3.522 ↑ 333.3 3 1

Function Scan on getattractions ca (cost=0.25..10.25 rows=1,000 width=28) (actual time=3.521..3.522 rows=3 loops=1)

12. 0.402 2.064 ↑ 1.0 3,969 1

Hash (cost=217.76..217.76 rows=3,969 width=13) (actual time=2.063..2.064 rows=3,969 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 207kB
13. 1.662 1.662 ↑ 1.0 3,969 1

Seq Scan on rtsepebrbrav ic (cost=0.00..217.76 rows=3,969 width=13) (actual time=0.685..1.662 rows=3,969 loops=1)

  • Filter: ((value_num > '0'::numeric) AND (se_id = 1) AND (pe_id = 68) AND (ad_id = 66))
  • Rows Removed by Filter: 3969
14. 0.579 5.767 ↓ 4.0 4,063 1

Hash (cost=858.96..858.96 rows=1,017 width=33) (actual time=5.767..5.767 rows=4,063 loops=1)

  • Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 302kB
15. 0.207 5.188 ↓ 4.0 4,063 1

Append (cost=0.28..858.96 rows=1,017 width=33) (actual time=1.873..5.188 rows=4,063 loops=1)

16. 0.010 0.010 ↓ 0.0 0 1

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

  • Index Cond: ((se_id = 1) AND (pe_id = 68))
17. 0.309 4.971 ↓ 4.0 4,063 1

Subquery Scan on *SELECT* 2 (cost=455.46..852.91 rows=1,016 width=33) (actual time=1.863..4.971 rows=4,063 loops=1)

18. 1.828 4.662 ↓ 4.0 4,063 1

Hash Join (cost=455.46..842.75 rows=1,016 width=753) (actual time=1.863..4.662 rows=4,063 loops=1)

  • Hash Cond: (av.pe_id = rtpe.baseline_id)
19. 0.996 2.825 ↓ 2.0 8,126 1

Seq Scan on calc_zones av (cost=454.40..816.29 rows=4,063 width=37) (actual time=1.848..2.825 rows=8,126 loops=1)

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

SubPlan (forSeq Scan)

21. 0.741 1.829 ↓ 0.0 0 1

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

  • Hash Cond: (av_1.pe_id = rtpe_1.id)
22. 1.085 1.085 ↑ 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..1.085 rows=8,126 loops=1)

23. 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
24. 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
25. 0.002 0.009 ↑ 1.0 1 1

Hash (cost=1.05..1.05 rows=1 width=4) (actual time=0.009..0.009 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
26. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on rtpe (cost=0.00..1.05 rows=1 width=4) (actual time=0.006..0.007 rows=1 loops=1)

  • Filter: (id = 68)
  • Rows Removed by Filter: 3