explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FjeV : my

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 45.800 26,463.889 ↓ 868.0 868 1

Nested Loop Left Join (cost=35,057.05..41,580.51 rows=1 width=474) (actual time=428.366..26,463.889 rows=868 loops=1)

2. 0.839 26,415.485 ↓ 868.0 868 1

Nested Loop Left Join (cost=35,056.20..41,569.71 rows=1 width=487) (actual time=427.941..26,415.485 rows=868 loops=1)

3. 2.529 26,412.042 ↓ 868.0 868 1

Nested Loop Left Join (cost=35,055.78..41,569.25 rows=1 width=448) (actual time=427.939..26,412.042 rows=868 loops=1)

4. 11.834 26,404.305 ↓ 868.0 868 1

Nested Loop Left Join (cost=35,055.35..41,560.79 rows=1 width=390) (actual time=427.934..26,404.305 rows=868 loops=1)

  • Join Filter: (p.projekti_id = o.projekti_id)
5. 3,347.997 26,385.527 ↓ 868.0 868 1

Nested Loop Left Join (cost=35,055.35..41,559.72 rows=1 width=382) (actual time=427.903..26,385.527 rows=868 loops=1)

  • Join Filter: (kk.objekti_id = o.objekti_id)
  • Rows Removed by Join Filter: 65662464
6. 19.568 196.110 ↓ 868.0 868 1

Nested Loop (cost=8,130.80..14,628.17 rows=1 width=334) (actual time=90.360..196.110 rows=868 loops=1)

  • Join Filter: (o.fishnet_id = f.fishnet_id)
  • Rows Removed by Join Filter: 36416
7. 9.537 108.188 ↓ 3,107.0 3,107 1

Merge Left Join (cost=8,130.80..14,623.25 rows=1 width=334) (actual time=90.312..108.188 rows=3,107 loops=1)

  • Merge Cond: (o.objekti_id = objekti_etaze.objekti_id)
8. 3.314 37.004 ↓ 3,107.0 3,107 1

Sort (cost=8,130.39..8,130.39 rows=1 width=318) (actual time=35.405..37.004 rows=3,107 loops=1)

  • Sort Key: o.objekti_id
  • Sort Method: quicksort Memory: 1023kB
9. 33.690 33.690 ↓ 3,107.0 3,107 1

Seq Scan on objekti o (cost=0.00..8,130.38 rows=1 width=318) (actual time=0.458..33.690 rows=3,107 loops=1)

  • Filter: ((status > 0) AND (projekti_id = 14))
  • Rows Removed by Filter: 72543
10. 10.152 61.647 ↓ 1.2 75,650 1

Materialize (cost=0.42..6,330.12 rows=65,091 width=24) (actual time=0.026..61.647 rows=75,650 loops=1)

11. 31.673 51.495 ↓ 1.2 75,650 1

GroupAggregate (cost=0.42..5,516.48 rows=65,091 width=24) (actual time=0.020..51.495 rows=75,650 loops=1)

  • Group Key: objekti_etaze.objekti_id
12. 19.822 19.822 ↓ 1.0 89,479 1

Index Only Scan using objekti_etaze_pkey on objekti_etaze (cost=0.42..4,221.88 rows=85,825 width=16) (actual time=0.012..19.822 rows=89,479 loops=1)

  • Heap Fetches: 39972
13. 68.354 68.354 ↓ 1.5 12 3,107

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

  • Filter: (fishnet_sifra = 5)
  • Rows Removed by Filter: 189
14. 22,590.044 22,841.420 ↓ 378.2 75,649 868

HashAggregate (cost=26,924.54..26,927.04 rows=200 width=52) (actual time=0.371..26.315 rows=75,649 loops=868)

  • Group Key: kk.objekti_id
15. 52.432 251.376 ↓ 1.0 104,876 1

GroupAggregate (cost=16,726.58..24,828.72 rows=104,791 width=40) (actual time=89.027..251.376 rows=104,876 loops=1)

  • Group Key: kk.katovi_id
16. 42.079 198.944 ↓ 1.0 131,722 1

Merge Left Join (cost=16,726.58..22,818.89 rows=128,256 width=28) (actual time=89.011..198.944 rows=131,722 loops=1)

  • Merge Cond: (kk.katovi_id = ddd.katovi_id)
17. 32.534 32.534 ↓ 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.008..32.534 rows=104,876 loops=1)

18. 11.486 124.331 ↓ 1.0 131,721 1

Materialize (cost=16,726.23..17,367.51 rows=128,256 width=24) (actual time=88.999..124.331 rows=131,721 loops=1)

19. 92.291 112.845 ↓ 1.0 131,721 1

Sort (cost=16,726.23..17,046.87 rows=128,256 width=24) (actual time=88.994..112.845 rows=131,721 loops=1)

  • Sort Key: ddd.katovi_id
  • Sort Method: external merge Disk: 4368kB
20. 20.554 20.554 ↓ 1.0 131,721 1

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

21. 6.944 6.944 ↑ 1.0 1 868

Seq Scan on projekti p (cost=0.00..1.06 rows=1 width=16) (actual time=0.008..0.008 rows=1 loops=868)

  • Filter: (projekti_id = 14)
  • Rows Removed by Filter: 14
22. 5.208 5.208 ↓ 0.0 0 868

Index Scan using objekti_images_index on objekti_images oi (cost=0.43..8.45 rows=1 width=70) (actual time=0.006..0.006 rows=0 loops=868)

  • Index Cond: ((objekti_id = o.objekti_id) AND (images_id = o.foto_1))
23. 2.604 2.604 ↓ 0.0 0 868

Index Scan using images_pkey on images i (cost=0.42..0.45 rows=1 width=51) (actual time=0.002..0.003 rows=0 loops=868)

  • Index Cond: (images_id = oi.images_id)
24. 0.812 2.604 ↓ 0.0 0 868

Nested Loop Left Join (cost=0.85..8.91 rows=1 width=113) (actual time=0.003..0.003 rows=0 loops=868)

25. 0.868 0.868 ↓ 0.0 0 868

Index Scan using objekti_images_index on objekti_images oi_1 (cost=0.43..8.45 rows=1 width=70) (actual time=0.001..0.001 rows=0 loops=868)

  • Index Cond: ((objekti_id = o.objekti_id) AND (images_id = o.foto_2))
26. 0.924 0.924 ↑ 1.0 1 308

Index Scan using images_pkey on images i_1 (cost=0.42..0.45 rows=1 width=51) (actual time=0.003..0.003 rows=1 loops=308)

  • Index Cond: (images_id = oi_1.images_id)
Planning time : 3.085 ms
Execution time : 26,473.264 ms