explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AinJ : Slow

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 4,531.661 20,007.083 ↓ 1,184.0 1,184 1

Nested Loop Left Join (cost=25,642.45..33,605.56 rows=1 width=200) (actual time=275.507..20,007.083 rows=1,184 loops=1)

  • Join Filter: (kk.objekti_id = o.objekti_id)
  • Rows Removed by Join Filter: 89567232
2. 17.032 109.470 ↓ 1,184.0 1,184 1

Nested Loop (cost=0.00..7,954.74 rows=1 width=302) (actual time=0.904..109.470 rows=1,184 loops=1)

  • Join Filter: (o.fishnet_id = f.fishnet_id)
  • Rows Removed by Join Filter: 39892
3. 20.555 20.555 ↓ 3,423.0 3,423 1

Seq Scan on objekti o (cost=0.00..7,949.81 rows=1 width=302) (actual time=0.249..20.555 rows=3,423 loops=1)

  • Filter: (projekti_id = 14)
  • Rows Removed by Filter: 72227
4. 71.883 71.883 ↓ 1.5 12 3,423

Seq Scan on fishnet f (cost=0.00..4.83 rows=8 width=12) (actual time=0.004..0.021 rows=12 loops=3,423)

  • Filter: (fishnet_sifra = 5)
  • Rows Removed by Filter: 189
5. 15,139.159 15,365.952 ↓ 378.2 75,649 1,184

HashAggregate (cost=25,642.45..25,644.45 rows=200 width=52) (actual time=0.220..12.978 rows=75,649 loops=1,184)

  • Group Key: kk.objekti_id
6. 41.036 226.793 ↓ 1.0 104,876 1

GroupAggregate (cost=16,289.08..24,070.58 rows=104,791 width=40) (actual time=90.007..226.793 rows=104,876 loops=1)

  • Group Key: kk.katovi_id
7. 37.541 185.757 ↓ 1.0 131,722 1

Merge Left Join (cost=16,289.08..22,381.39 rows=128,256 width=20) (actual time=89.991..185.757 rows=131,722 loops=1)

  • Merge Cond: (kk.katovi_id = ddd.katovi_id)
8. 28.385 28.385 ↓ 1.0 104,876 1

Index Scan using katovi_pkey on katovi kk (cost=0.29..3,592.75 rows=104,791 width=12) (actual time=0.006..28.385 rows=104,876 loops=1)

9. 10.700 119.831 ↓ 1.0 131,721 1

Materialize (cost=16,288.73..16,930.01 rows=128,256 width=16) (actual time=89.980..119.831 rows=131,721 loops=1)

10. 89.192 109.131 ↓ 1.0 131,721 1

Sort (cost=16,288.73..16,609.37 rows=128,256 width=16) (actual time=89.972..109.131 rows=131,721 loops=1)

  • Sort Key: ddd.katovi_id
  • Sort Method: external merge Disk: 3344kB
11. 19.939 19.939 ↓ 1.0 131,721 1

Seq Scan on dijelovi ddd (cost=0.00..3,212.56 rows=128,256 width=16) (actual time=0.009..19.939 rows=131,721 loops=1)

Planning time : 0.518 ms
Execution time : 20,010.785 ms