explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2gvD

Settings
# exclusive inclusive rows x rows loops node
1. 1.638 488.985 ↑ 20.0 1 1

GroupAggregate (cost=10,308.51..10,309.66 rows=20 width=44) (actual time=488.985..488.985 rows=1 loops=1)

  • Group Key: v.yil, v.ay
2. 1.757 487.347 ↓ 86.8 6,250 1

Sort (cost=10,308.51..10,308.69 rows=72 width=13) (actual time=487.145..487.347 rows=6,250 loops=1)

  • Sort Key: v.yil, v.ay
  • Sort Method: quicksort Memory: 486kB
3. 0.937 485.590 ↓ 86.8 6,250 1

Nested Loop (cost=7,610.58..10,306.29 rows=72 width=13) (actual time=454.389..485.590 rows=6,250 loops=1)

4. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on uretim_merkezleri um (cost=0.00..1.04 rows=1 width=4) (actual time=0.008..0.010 rows=1 loops=1)

  • Filter: (uretim_merkez_id = 1)
  • Rows Removed by Filter: 2
5. 2.363 484.643 ↓ 86.8 6,250 1

Hash Join (cost=7,610.58..10,304.53 rows=72 width=17) (actual time=454.377..484.643 rows=6,250 loops=1)

  • Hash Cond: (m_1.makine_id = m.makine_id)
6. 6.563 482.239 ↓ 1.0 6,250 1

Hash Left Join (cost=7,605.78..10,222.33 rows=6,130 width=1,245) (actual time=454.328..482.239 rows=6,250 loops=1)

  • Hash Cond: ((rvm.makine_id = wrvmp.makine_id) AND (rvm.vardiya_id = wrvmp.vardiya_id))
7.          

CTE w_randiman_vrd_makine_personel

8. 83.124 433.124 ↓ 485.6 22,337 1

GroupAggregate (cost=7,556.55..7,560.46 rows=46 width=60) (actual time=348.877..433.124 rows=22,337 loops=1)

  • Group Key: vrvmp.vardiya_id, vrvmp.makine_id
9. 16.480 350.000 ↓ 487.8 22,440 1

Sort (cost=7,556.55..7,556.67 rows=46 width=144) (actual time=348.862..350.000 rows=22,440 loops=1)

  • Sort Key: vrvmp.vardiya_id, vrvmp.makine_id
  • Sort Method: quicksort Memory: 3741kB
10. 5.155 333.520 ↓ 487.8 22,440 1

Subquery Scan on vrvmp (cost=7,006.43..7,555.28 rows=46 width=144) (actual time=71.123..333.520 rows=22,440 loops=1)

11. 18.603 328.365 ↓ 487.8 22,440 1

Nested Loop (cost=7,006.43..7,554.82 rows=46 width=1,224) (actual time=71.122..328.365 rows=22,440 loops=1)

  • Join Filter: (p.personel_gorev_id = pg.personel_gorev_id)
  • Rows Removed by Join Filter: 2851
12.          

CTE w_randiman_vrd_makine_personel

13. 83.402 162.318 ↑ 1.0 22,440 1

GroupAggregate (cost=4,563.68..6,998.21 rows=23,186 width=216) (actual time=70.953..162.318 rows=22,440 loops=1)

  • Group Key: rvmp.vardiya_id, vvm.makine_id, rvmp.personel_id, rvmp.personel_vardiya_grup_id, rvmp.sayac_birim_id, rvmp.birim_id
14. 40.183 78.916 ↑ 1.0 23,186 1

Sort (cost=4,563.68..4,621.65 rows=23,186 width=109) (actual time=70.932..78.916 rows=23,186 loops=1)

  • Sort Key: rvmp.vardiya_id, vvm.makine_id, rvmp.personel_id, rvmp.personel_vardiya_grup_id, rvmp.sayac_birim_id, rvmp.birim_id
  • Sort Method: external merge Disk: 2744kB
15. 19.362 38.733 ↑ 1.0 23,186 1

Hash Join (cost=1,825.86..2,882.58 rows=23,186 width=109) (actual time=16.951..38.733 rows=23,186 loops=1)

  • Hash Cond: (rvmp.veri_vrd_makine_id = vvm.veri_vrd_makine_id)
16. 2.728 2.728 ↑ 1.0 23,186 1

Seq Scan on randiman_vrd_makine_personel rvmp (cost=0.00..995.86 rows=23,186 width=109) (actual time=0.011..2.728 rows=23,186 loops=1)

17. 8.261 16.643 ↑ 1.0 56,397 1

Hash (cost=1,118.16..1,118.16 rows=56,616 width=8) (actual time=16.642..16.643 rows=56,397 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2716kB
18. 8.382 8.382 ↑ 1.0 56,397 1

Seq Scan on veri_vrd_makine vvm (cost=0.00..1,118.16 rows=56,616 width=8) (actual time=0.011..8.382 rows=56,397 loops=1)

19. 14.261 309.762 ↓ 487.8 22,440 1

Nested Loop (cost=8.22..551.85 rows=46 width=148) (actual time=71.108..309.762 rows=22,440 loops=1)

  • Join Filter: (v_1.vardiya_zaman_id = vz_1.vardiya_zaman_id)
  • Rows Removed by Join Filter: 22526
20. 20.684 295.501 ↓ 487.8 22,440 1

Nested Loop (cost=8.22..549.08 rows=46 width=152) (actual time=71.094..295.501 rows=22,440 loops=1)

21. 10.193 229.937 ↓ 487.8 22,440 1

Hash Join (cost=7.95..535.41 rows=46 width=148) (actual time=71.074..229.937 rows=22,440 loops=1)

  • Hash Cond: (wrvmp_1.makine_id = m_2.makine_id)
22. 8.450 219.718 ↓ 175.3 22,440 1

Hash Join (cost=3.33..530.44 rows=128 width=148) (actual time=71.030..219.718 rows=22,440 loops=1)

  • Hash Cond: (wrvmp_1.personel_id = p.personel_id)
23. 15.266 211.241 ↓ 48.4 22,440 1

Hash Join (cost=1.09..526.96 rows=464 width=148) (actual time=70.988..211.241 rows=22,440 loops=1)

  • Hash Cond: (wrvmp_1.personel_vardiya_grup_id = pvg.personel_vardiya_grup_id)
24. 195.959 195.959 ↑ 1.0 22,440 1

CTE Scan on w_randiman_vrd_makine_personel wrvmp_1 (cost=0.00..463.72 rows=23,186 width=160) (actual time=70.956..195.959 rows=22,440 loops=1)

25. 0.003 0.016 ↑ 1.0 4 1

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

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

Seq Scan on personel_vardiya_gruplari pvg (cost=0.00..1.04 rows=4 width=4) (actual time=0.011..0.013 rows=4 loops=1)

27. 0.009 0.027 ↑ 1.0 55 1

Hash (cost=1.55..1.55 rows=55 width=8) (actual time=0.027..0.027 rows=55 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
28. 0.018 0.018 ↑ 1.0 55 1

Seq Scan on personeller p (cost=0.00..1.55 rows=55 width=8) (actual time=0.010..0.018 rows=55 loops=1)

29. 0.008 0.026 ↑ 1.0 72 1

Hash (cost=3.72..3.72 rows=72 width=4) (actual time=0.026..0.026 rows=72 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
30. 0.018 0.018 ↑ 1.0 72 1

Seq Scan on makineler m_2 (cost=0.00..3.72 rows=72 width=4) (actual time=0.007..0.018 rows=72 loops=1)

31. 44.880 44.880 ↑ 1.0 1 22,440

Index Scan using pk_vardiyalar on vardiyalar v_1 (cost=0.28..0.30 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=22,440)

  • Index Cond: (vardiya_id = wrvmp_1.vardiya_id)
32. 0.000 0.000 ↑ 1.5 2 22,440

Materialize (cost=0.00..1.04 rows=3 width=4) (actual time=0.000..0.000 rows=2 loops=22,440)

33. 0.007 0.007 ↑ 1.0 3 1

Seq Scan on vardiya_zamanlari vz_1 (cost=0.00..1.03 rows=3 width=4) (actual time=0.006..0.007 rows=3 loops=1)

34. 0.000 0.000 ↑ 6.0 1 22,440

Materialize (cost=0.00..1.09 rows=6 width=4) (actual time=0.000..0.000 rows=1 loops=22,440)

35. 0.008 0.008 ↑ 1.0 6 1

Seq Scan on personel_gorevleri pg (cost=0.00..1.06 rows=6 width=4) (actual time=0.005..0.008 rows=6 loops=1)

36.          

CTE w_devir_hesap_tipleri

37. 0.025 0.103 ↓ 1.0 72 1

Hash Join (cost=2.16..5.00 rows=71 width=20) (actual time=0.036..0.103 rows=72 loops=1)

  • Hash Cond: (pms.birim_id = b_1.birim_id)
38. 0.027 0.069 ↓ 1.0 72 1

Hash Join (cost=1.04..3.54 rows=71 width=17) (actual time=0.022..0.069 rows=72 loops=1)

  • Hash Cond: (pms.devir_hesap_tip_id = dht.devir_hesap_tip_id)
39. 0.033 0.033 ↓ 1.0 72 1

Seq Scan on port_makine_sayac pms (cost=0.00..1.91 rows=71 width=12) (actual time=0.009..0.033 rows=72 loops=1)

  • Filter: (calisiyor_bilgisi_alinacak AND (sayac_tip_id = 1))
  • Rows Removed by Filter: 1
40. 0.005 0.009 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=9) (actual time=0.008..0.009 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
41. 0.004 0.004 ↑ 1.0 2 1

Seq Scan on devir_hesap_tipleri dht (cost=0.00..1.02 rows=2 width=9) (actual time=0.003..0.004 rows=2 loops=1)

42. 0.003 0.009 ↓ 1.2 6 1

Hash (cost=1.05..1.05 rows=5 width=7) (actual time=0.009..0.009 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
43. 0.006 0.006 ↓ 1.2 6 1

Seq Scan on birimler b_1 (cost=0.00..1.05 rows=5 width=7) (actual time=0.004..0.006 rows=6 loops=1)

44. 2.074 21.696 ↓ 1.0 6,250 1

Hash Left Join (cost=38.71..2,609.23 rows=6,130 width=25) (actual time=0.318..21.696 rows=6,250 loops=1)

  • Hash Cond: (rvm.makine_id = wdht.makine_id)
45. 2.180 19.471 ↓ 1.0 6,250 1

Hash Join (cost=36.40..2,523.48 rows=6,130 width=25) (actual time=0.162..19.471 rows=6,250 loops=1)

  • Hash Cond: (rvm.makine_id = m_1.makine_id)
46. 1.651 17.265 ↓ 1.0 6,250 1

Hash Join (cost=31.78..2,501.83 rows=6,130 width=21) (actual time=0.131..17.265 rows=6,250 loops=1)

  • Hash Cond: (v.vardiya_zaman_id = vz.vardiya_zaman_id)
47. 10.322 15.607 ↓ 1.0 6,250 1

Hash Join (cost=30.71..2,461.94 rows=6,130 width=25) (actual time=0.119..15.607 rows=6,250 loops=1)

  • Hash Cond: (rvm.vardiya_id = v.vardiya_id)
48. 5.178 5.178 ↑ 1.0 55,167 1

Seq Scan on randiman_vrd_makine rvm (cost=0.00..2,285.67 rows=55,167 width=25) (actual time=0.006..5.178 rows=55,167 loops=1)

49. 0.022 0.107 ↓ 1.0 93 1

Hash (cost=29.57..29.57 rows=91 width=12) (actual time=0.107..0.107 rows=93 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
50. 0.031 0.085 ↓ 1.0 93 1

Bitmap Heap Scan on vardiyalar v (cost=9.21..29.57 rows=91 width=12) (actual time=0.061..0.085 rows=93 loops=1)

  • Recheck Cond: ((tarih >= '2020-01-01'::date) AND (tarih <= '2020-01-31'::date))
  • Heap Blocks: exact=3
51. 0.054 0.054 ↓ 1.0 93 1

Bitmap Index Scan on "uc_vardiyalar_(tarih|uretim_merkez_id|vardiya_zaman_id)" (cost=0.00..9.19 rows=91 width=0) (actual time=0.054..0.054 rows=93 loops=1)

  • Index Cond: ((tarih >= '2020-01-01'::date) AND (tarih <= '2020-01-31'::date))
52. 0.002 0.007 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=4) (actual time=0.007..0.007 rows=3 loops=1)

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

Seq Scan on vardiya_zamanlari vz (cost=0.00..1.03 rows=3 width=4) (actual time=0.004..0.005 rows=3 loops=1)

54. 0.013 0.026 ↑ 1.0 72 1

Hash (cost=3.72..3.72 rows=72 width=4) (actual time=0.026..0.026 rows=72 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
55. 0.013 0.013 ↑ 1.0 72 1

Seq Scan on makineler m_1 (cost=0.00..3.72 rows=72 width=4) (actual time=0.005..0.013 rows=72 loops=1)

56. 0.008 0.151 ↓ 1.0 72 1

Hash (cost=1.42..1.42 rows=71 width=4) (actual time=0.151..0.151 rows=72 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
57. 0.143 0.143 ↓ 1.0 72 1

CTE Scan on w_devir_hesap_tipleri wdht (cost=0.00..1.42 rows=71 width=4) (actual time=0.039..0.143 rows=72 loops=1)

58. 4.721 453.980 ↓ 485.6 22,337 1

Hash (cost=0.92..0.92 rows=46 width=8) (actual time=453.980..453.980 rows=22,337 loops=1)

  • Buckets: 32768 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1129kB
59. 449.259 449.259 ↓ 485.6 22,337 1

CTE Scan on w_randiman_vrd_makine_personel wrvmp (cost=0.00..0.92 rows=46 width=8) (actual time=348.881..449.259 rows=22,337 loops=1)

60. 0.015 0.041 ↑ 1.0 72 1

Hash (cost=3.90..3.90 rows=72 width=8) (actual time=0.041..0.041 rows=72 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
61. 0.026 0.026 ↑ 1.0 72 1

Seq Scan on makineler m (cost=0.00..3.90 rows=72 width=8) (actual time=0.006..0.026 rows=72 loops=1)

  • Filter: (uretim_merkez_id = 1)
Planning time : 4.616 ms
Execution time : 493.847 ms