explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Dt0

Settings
# exclusive inclusive rows x rows loops node
1. 0.208 4,276.739 ↑ 9.0 67 1

GroupAggregate (cost=56,878.17..56,896.17 rows=600 width=71) (actual time=4,276.531..4,276.739 rows=67 loops=1)

  • Group Key: vi.makine_id, vi.isemri_makine_plan_id, imp.entegrasyon_kodu, u.urun_kodu, imp.miktar
2. 0.299 4,276.531 ↑ 1.9 316 1

Sort (cost=56,878.17..56,879.67 rows=600 width=71) (actual time=4,276.519..4,276.531 rows=316 loops=1)

  • Sort Key: vi.makine_id, vi.isemri_makine_plan_id, imp.entegrasyon_kodu, u.urun_kodu, imp.miktar
  • Sort Method: quicksort Memory: 54kB
3. 15.057 4,276.232 ↑ 1.9 316 1

Hash Right Join (cost=46,847.15..56,850.49 rows=600 width=71) (actual time=4,063.637..4,276.232 rows=316 loops=1)

  • Hash Cond: (wrvi.isemri_makine_plan_id = imp.isemri_makine_plan_id)
4. 321.601 4,256.049 ↑ 1.0 82,871 1

Hash Left Join (cost=46,213.04..55,066.78 rows=83,171 width=1,002) (actual time=1,780.403..4,256.049 rows=82,871 loops=1)

  • Hash Cond: ((wrvi.vardiya_id = wrvip.vardiya_id) AND (wrvi.isemri_makine_plan_id = wrvip.isemri_makine_plan_id))
5.          

CTE w_randiman_vrd_isemri

6. 941.448 1,594.000 ↑ 1.0 82,871 1

GroupAggregate (cost=16,188.80..27,624.81 rows=83,171 width=268) (actual time=622.156..1,594.000 rows=82,871 loops=1)

  • Group Key: rvi.vardiya_id, vi_1.isemri_makine_plan_id, vi_1.makine_id, rvi.sayac_birim_id, rvi.birim_id
7. 579.227 652.552 ↑ 1.0 83,027 1

Sort (cost=16,188.80..16,396.73 rows=83,171 width=134) (actual time=622.137..652.552 rows=83,027 loops=1)

  • Sort Key: rvi.vardiya_id, vi_1.isemri_makine_plan_id, vi_1.makine_id, rvi.sayac_birim_id, rvi.birim_id
  • Sort Method: external merge Disk: 11,912kB
8. 58.312 73.325 ↑ 1.0 83,027 1

Hash Join (cost=298.52..3,704.65 rows=83,171 width=134) (actual time=3.251..73.325 rows=83,027 loops=1)

  • Hash Cond: (rvi.veri_isemri_id = vi_1.veri_isemri_id)
9. 11.890 11.890 ↑ 1.0 83,027 1

Seq Scan on randiman_vrd_isemri rvi (cost=0.00..3,187.71 rows=83,171 width=130) (actual time=0.008..11.890 rows=83,027 loops=1)

10. 1.520 3.123 ↓ 1.0 9,125 1

Hash (cost=187.12..187.12 rows=8,912 width=12) (actual time=3.123..3.123 rows=9,125 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 521kB
11. 1.603 1.603 ↓ 1.0 9,125 1

Seq Scan on veri_isemri vi_1 (cost=0.00..187.12 rows=8,912 width=12) (actual time=0.006..1.603 rows=9,125 loops=1)

12.          

CTE w_randiman_vrd_isemri_personel

13. 121.592 787.090 ↓ 170.2 40,841 1

GroupAggregate (cost=18,119.41..18,136.81 rows=240 width=192) (actual time=659.381..787.090 rows=40,841 loops=1)

  • Group Key: rviph.vardiya_id, rviph.isemri_makine_plan_id
14. 41.472 665.498 ↓ 170.8 40,985 1

Sort (cost=18,119.41..18,120.01 rows=240 width=144) (actual time=659.364..665.498 rows=40,985 loops=1)

  • Sort Key: rviph.vardiya_id, rviph.isemri_makine_plan_id
  • Sort Method: external merge Disk: 3,128kB
15. 10.251 624.026 ↓ 170.8 40,985 1

Subquery Scan on rviph (cost=17,136.44..18,109.93 rows=240 width=144) (actual time=212.362..624.026 rows=40,985 loops=1)

16. 59.210 613.775 ↓ 170.8 40,985 1

Hash Join (cost=17,136.44..18,107.53 rows=240 width=888) (actual time=212.360..613.775 rows=40,985 loops=1)

  • Hash Cond: (p.personel_gorev_id = pg.personel_gorev_id)
17.          

CTE w_randiman_vrd_isemri_personel

18. 178.792 404.423 ↑ 1.0 40,985 1

GroupAggregate (cost=12,657.83..17,080.33 rows=42,119 width=216) (actual time=211.722..404.423 rows=40,985 loops=1)

  • Group Key: rvip.vardiya_id, vi_2.isemri_makine_plan_id, rvip.personel_id, rvip.personel_vardiya_grup_id, rvip.sayac_birim_id, rvip.birim_id
19. 77.809 225.631 ↓ 1.0 42,151 1

Sort (cost=12,657.83..12,763.13 rows=42,119 width=110) (actual time=211.706..225.631 rows=42,151 loops=1)

  • Sort Key: rvip.vardiya_id, vi_2.isemri_makine_plan_id, rvip.personel_id, rvip.personel_vardiya_grup_id, rvip.sayac_birim_id, rvip.birim_id
  • Sort Method: external merge Disk: 4,976kB
20. 21.560 147.822 ↓ 1.0 42,151 1

Hash Join (cost=3,555.25..6,972.63 rows=42,119 width=110) (actual time=43.650..147.822 rows=42,151 loops=1)

  • Hash Cond: (vvi.veri_isemri_id = vi_2.veri_isemri_id)
21. 60.238 123.638 ↓ 1.0 42,151 1

Hash Join (cost=3,256.73..6,563.50 rows=42,119 width=110) (actual time=40.797..123.638 rows=42,151 loops=1)

  • Hash Cond: (rvip.veri_vrd_isemri_id = vvi.veri_vrd_isemri_id)
22. 23.528 23.528 ↓ 1.0 42,151 1

Seq Scan on randiman_vrd_isemri_personel rvip (cost=0.00..1,476.19 rows=42,119 width=110) (actual time=0.012..23.528 rows=42,151 loops=1)

23. 15.743 39.872 ↓ 1.0 83,027 1

Hash (cost=1,915.77..1,915.77 rows=81,677 width=8) (actual time=39.872..39.872 rows=83,027 loops=1)

  • Buckets: 131,072 Batches: 2 Memory Usage: 2,652kB
24. 24.129 24.129 ↓ 1.0 83,027 1

Seq Scan on veri_vrd_isemri vvi (cost=0.00..1,915.77 rows=81,677 width=8) (actual time=0.010..24.129 rows=83,027 loops=1)

25. 1.216 2.624 ↓ 1.0 9,125 1

Hash (cost=187.12..187.12 rows=8,912 width=8) (actual time=2.624..2.624 rows=9,125 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 485kB
26. 1.408 1.408 ↓ 1.0 9,125 1

Seq Scan on veri_isemri vi_2 (cost=0.00..187.12 rows=8,912 width=8) (actual time=0.009..1.408 rows=9,125 loops=1)

27. 25.548 554.550 ↓ 170.8 40,985 1

Nested Loop (cost=54.98..1,023.19 rows=240 width=148) (actual time=212.335..554.550 rows=40,985 loops=1)

  • Join Filter: (v_1.vardiya_zaman_id = vz_1.vardiya_zaman_id)
  • Rows Removed by Join Filter: 41,442
28. 18.968 529.002 ↓ 170.8 40,985 1

Hash Join (cost=54.98..1,013.15 rows=240 width=152) (actual time=212.318..529.002 rows=40,985 loops=1)

  • Hash Cond: (wrvip_1.vardiya_id = v_1.vardiya_id)
29. 15.976 509.555 ↓ 170.8 40,985 1

Hash Join (cost=3.37..960.92 rows=240 width=148) (actual time=211.817..509.555 rows=40,985 loops=1)

  • Hash Cond: (wrvip_1.personel_id = p.personel_id)
30. 28.026 493.543 ↓ 48.7 40,985 1

Hash Join (cost=1.09..956.38 rows=842 width=148) (actual time=211.769..493.543 rows=40,985 loops=1)

  • Hash Cond: (wrvip_1.personel_vardiya_grup_id = pvg.personel_vardiya_grup_id)
31. 465.487 465.487 ↑ 1.0 40,985 1

CTE Scan on w_randiman_vrd_isemri_personel wrvip_1 (cost=0.00..842.38 rows=42,119 width=160) (actual time=211.726..465.487 rows=40,985 loops=1)

32. 0.013 0.030 ↑ 1.0 4 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
33. 0.017 0.017 ↑ 1.0 4 1

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

34. 0.013 0.036 ↓ 1.3 73 1

Hash (cost=1.57..1.57 rows=57 width=8) (actual time=0.036..0.036 rows=73 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
35. 0.023 0.023 ↓ 1.3 73 1

Seq Scan on personeller p (cost=0.00..1.57 rows=57 width=8) (actual time=0.011..0.023 rows=73 loops=1)

36. 0.235 0.479 ↓ 1.0 1,491 1

Hash (cost=33.49..33.49 rows=1,449 width=8) (actual time=0.479..0.479 rows=1,491 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 75kB
37. 0.244 0.244 ↓ 1.0 1,491 1

Seq Scan on vardiyalar v_1 (cost=0.00..33.49 rows=1,449 width=8) (actual time=0.010..0.244 rows=1,491 loops=1)

38. 0.000 0.000 ↑ 1.5 2 40,985

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

39. 0.008 0.008 ↑ 1.0 3 1

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

40. 0.008 0.015 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=4) (actual time=0.014..0.015 rows=6 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
41. 0.007 0.007 ↑ 1.0 6 1

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

42.          

CTE w_devir_hesap_tipleri

43. 0.027 0.124 ↓ 1.0 72 1

Hash Join (cost=2.18..5.00 rows=71 width=20) (actual time=0.056..0.124 rows=72 loops=1)

  • Hash Cond: (pms.birim_id = b_1.birim_id)
44. 0.033 0.081 ↓ 1.0 72 1

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

  • Hash Cond: (pms.devir_hesap_tip_id = dht.devir_hesap_tip_id)
45. 0.036 0.036 ↓ 1.0 72 1

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

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

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
47. 0.007 0.007 ↑ 1.0 2 1

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

48. 0.009 0.016 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=7) (actual time=0.015..0.016 rows=6 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
49. 0.007 0.007 ↑ 1.0 6 1

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

50. 31.083 2,779.723 ↑ 1.0 82,871 1

Hash Left Join (cost=438.01..3,672.72 rows=83,171 width=40) (actual time=625.665..2,779.723 rows=82,871 loops=1)

  • Hash Cond: (wrvi.makine_id = wdht.makine_id)
51. 33.406 2,748.458 ↑ 1.0 82,871 1

Hash Join (cost=435.70..3,063.26 rows=83,171 width=44) (actual time=625.473..2,748.458 rows=82,871 loops=1)

  • Hash Cond: (wrvi.isemri_makine_plan_id = imp_1.isemri_makine_plan_id)
52. 25.827 2,712.383 ↑ 1.0 82,871 1

Hash Join (cost=52.67..2,461.80 rows=83,171 width=44) (actual time=622.677..2,712.383 rows=82,871 loops=1)

  • Hash Cond: (v.vardiya_zaman_id = vz.vardiya_zaman_id)
53. 954.958 2,686.527 ↑ 1.0 82,871 1

Hash Join (cost=51.60..1,933.98 rows=83,171 width=48) (actual time=622.639..2,686.527 rows=82,871 loops=1)

  • Hash Cond: (wrvi.vardiya_id = v.vardiya_id)
54. 1,731.122 1,731.122 ↑ 1.0 82,871 1

CTE Scan on w_randiman_vrd_isemri wrvi (cost=0.00..1,663.42 rows=83,171 width=52) (actual time=622.163..1,731.122 rows=82,871 loops=1)

55. 0.190 0.447 ↓ 1.0 1,491 1

Hash (cost=33.49..33.49 rows=1,449 width=8) (actual time=0.447..0.447 rows=1,491 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 75kB
56. 0.257 0.257 ↓ 1.0 1,491 1

Seq Scan on vardiyalar v (cost=0.00..33.49 rows=1,449 width=8) (actual time=0.018..0.257 rows=1,491 loops=1)

57. 0.006 0.029 ↑ 1.0 3 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
58. 0.023 0.023 ↑ 1.0 3 1

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

59. 1.329 2.669 ↑ 1.0 9,552 1

Hash (cost=263.57..263.57 rows=9,557 width=4) (actual time=2.669..2.669 rows=9,552 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 464kB
60. 1.340 1.340 ↑ 1.0 9,552 1

Seq Scan on isemri_makine_plan imp_1 (cost=0.00..263.57 rows=9,557 width=4) (actual time=0.008..1.340 rows=9,552 loops=1)

61. 0.013 0.182 ↓ 1.0 72 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
62. 0.169 0.169 ↓ 1.0 72 1

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

63. 9.313 1,154.725 ↓ 170.2 40,841 1

Hash (cost=4.80..4.80 rows=240 width=8) (actual time=1,154.725..1,154.725 rows=40,841 loops=1)

  • Buckets: 65,536 (originally 1024) Batches: 1 (originally 1) Memory Usage: 2,108kB
64. 1,145.412 1,145.412 ↓ 170.2 40,841 1

CTE Scan on w_randiman_vrd_isemri_personel wrvip (cost=0.00..4.80 rows=240 width=8) (actual time=659.384..1,145.412 rows=40,841 loops=1)

65. 0.042 5.126 ↑ 1.0 67 1

Hash (cost=633.25..633.25 rows=69 width=43) (actual time=5.126..5.126 rows=67 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 14kB
66. 0.020 5.084 ↑ 1.0 67 1

Nested Loop (cost=188.84..633.25 rows=69 width=43) (actual time=2.870..5.084 rows=67 loops=1)

67. 0.028 4.863 ↑ 1.0 67 1

Nested Loop (cost=188.55..598.30 rows=69 width=29) (actual time=2.863..4.863 rows=67 loops=1)

68. 0.055 4.701 ↑ 1.0 67 1

Nested Loop (cost=188.27..572.55 rows=69 width=29) (actual time=2.858..4.701 rows=67 loops=1)

69. 0.981 4.512 ↑ 1.0 67 1

Hash Join (cost=187.98..547.81 rows=69 width=29) (actual time=2.846..4.512 rows=67 loops=1)

  • Hash Cond: (imp.isemri_makine_plan_id = vi.isemri_makine_plan_id)
70. 1.681 1.681 ↑ 1.0 9,552 1

Seq Scan on isemri_makine_plan imp (cost=0.00..263.57 rows=9,557 width=21) (actual time=0.011..1.681 rows=9,552 loops=1)

71. 0.022 1.850 ↑ 1.0 67 1

Hash (cost=187.12..187.12 rows=69 width=8) (actual time=1.850..1.850 rows=67 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
72. 1.828 1.828 ↑ 1.0 67 1

Seq Scan on veri_isemri vi (cost=0.00..187.12 rows=69 width=8) (actual time=0.797..1.828 rows=67 loops=1)

  • Filter: aktif
  • Rows Removed by Filter: 9,058
73. 0.134 0.134 ↑ 1.0 1 67

Index Scan using pk_isemri_rota on isemri_rota ir (cost=0.29..0.36 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=67)

  • Index Cond: (isemri_rota_id = imp.isemri_rota_id)
74. 0.134 0.134 ↑ 1.0 1 67

Index Scan using pk_isemri on isemri i (cost=0.29..0.37 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=67)

  • Index Cond: (isemri_id = ir.isemri_id)
75. 0.201 0.201 ↑ 1.0 1 67

Index Scan using pk_urunler on urunler u (cost=0.29..0.51 rows=1 width=22) (actual time=0.003..0.003 rows=1 loops=67)

  • Index Cond: (urun_id = i.urun_id)
Planning time : 301.007 ms
Execution time : 4,287.944 ms