explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VOGK

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 5,390.725 ↓ 0.0 0 1

Subquery Scan on z (cost=1,038,426.42..1,038,485.38 rows=1 width=1,283) (actual time=5,390.725..5,390.725 rows=0 loops=1)

2. 0.035 5,390.725 ↓ 0.0 0 1

Sort (cost=1,038,426.42..1,038,426.43 rows=1 width=919) (actual time=5,390.725..5,390.725 rows=0 loops=1)

  • Sort Key: ((SubPlan 8)), ((SubPlan 9)), x.fatura_dt DESC, x.t_skys_uretim_tuketim, x.tahsil_dt
  • Sort Method: quicksort Memory: 25kB
3. 0.002 5,390.690 ↓ 0.0 0 1

WindowAgg (cost=509,162.13..1,038,426.41 rows=1 width=919) (actual time=5,390.690..5,390.690 rows=0 loops=1)

4. 4,667.309 5,390.688 ↓ 0.0 0 1

Subquery Scan on x (cost=509,162.13..1,038,409.80 rows=1 width=433) (actual time=5,390.688..5,390.688 rows=0 loops=1)

5. 723.379 723.379 ↓ 0.0 0 1

Filter: (((x.fatura_no)::text <> 'IADE'::text) AND ((x.kullanici_ad)::text >"Subquery Scan on z (cost=786,036.01..786,094.96 rows=1 width=1,283) (actual time=723.379..723.379 rows=0 loops=1)

6. 0.048 723.379 ↓ 0.0 0 1

Sort (cost=786,036.01..786,036.01 rows=1 width=919) (actual time=723.379..723.379 rows=0 loops=1)

  • Sort Key: ((SubPlan 8)), ((SubPlan 9)), x.fatura_dt DESC, x.t_skys_uretim_tuketim, x.tahsil_dt
  • Sort Method: quicksort Memory: 25kB
7. 0.003 723.331 ↓ 0.0 0 1

WindowAgg (cost=509,162.11..786,036.00 rows=1 width=919) (actual time=723.331..723.331 rows=0 loops=1)

8. 8.465 723.328 ↓ 0.0 0 1

Subquery Scan on x (cost=509,162.11..786,019.39 rows=1 width=433) (actual time=723.328..723.328 rows=0 loops=1)

  • Filter: (((x.fatura_no)::text <> 'IADE'::text) AND ((x.kullanici_ad)::text >= '000%'::text) AND ((x.kullanici_ad)::text <= 'zzz%'::text) AND (x.t_skys_fatura_cins = 1) AND (x.fatura_ay = 1) AND (x.fatura_yil = 2020))
  • Rows Removed by Filter: 17200
9. 18.898 714.863 ↑ 1.1 17,200 1

WindowAgg (cost=509,162.11..785,554.24 rows=18,606 width=465) (actual time=675.647..714.863 rows=17,200 loops=1)

10. 134.810 678.765 ↑ 1.1 17,200 1

Sort (cost=509,162.11..509,208.63 rows=18,606 width=425) (actual time=675.581..678.765 rows=17,200 loops=1)

  • Sort Key: ("right"(("*SELECT* 1".fatura_no)::text, 13)), x2.fatura_tahsil_id
  • Sort Method: quicksort Memory: 5240kB
11. 8.783 543.955 ↑ 1.1 17,200 1

Hash Left Join (cost=35,661.05..507,842.62 rows=18,606 width=425) (actual time=382.159..543.955 rows=17,200 loops=1)

  • Hash Cond: ("*SELECT* 1".fatura_id = x2.fatura_id)
12. 6.231 534.268 ↑ 1.1 17,188 1

Hash Join (cost=35,627.01..507,438.49 rows=18,336 width=102) (actual time=381.228..534.268 rows=17,188 loops=1)

  • Hash Cond: ("*SELECT* 1".kullanici_id = kk.kullanici_id)
13. 35.498 526.946 ↑ 1.1 17,188 1

Hash Left Join (cost=35,539.04..507,098.40 rows=18,336 width=58) (actual time=380.116..526.946 rows=17,188 loops=1)

  • Hash Cond: (("*SELECT* 1".fatura_no)::text = (mf.fatura_no)::text)
14. 2.121 114.233 ↑ 1.1 17,188 1

Append (cost=113.99..468,334.62 rows=18,084 width=50) (actual time=1.632..114.233 rows=17,188 loops=1)

15. 3.249 104.852 ↑ 1.1 16,077 1

Subquery Scan on *SELECT* 1 (cost=113.99..467,657.04 rows=17,236 width=50) (actual time=1.632..104.852 rows=16,077 loops=1)

16. 10.195 101.603 ↑ 1.1 16,077 1

Hash Semi Join (cost=113.99..467,484.68 rows=17,236 width=220) (actual time=1.632..101.603 rows=16,077 loops=1)

  • Hash Cond: (y.kullanici_id = k1.kullanici_id)
17. 9.488 9.488 ↑ 1.0 17,201 1

Seq Scan on skys_fatura y (cost=0.00..553.36 rows=17,236 width=46) (actual time=0.012..9.488 rows=17,201 loops=1)

18. 0.264 1.535 ↓ 1.0 1,002 1

Hash (cost=101.72..101.72 rows=981 width=4) (actual time=1.535..1.535 rows=1,002 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 44kB
19. 0.613 1.271 ↓ 1.0 1,002 1

HashAggregate (cost=82.10..91.91 rows=981 width=4) (actual time=1.052..1.271 rows=1,002 loops=1)

  • Group Key: k1.kullanici_id
20. 0.658 0.658 ↓ 1.0 1,002 1

Seq Scan on skys_kullanici k1 (cost=0.00..79.65 rows=981 width=4) (actual time=0.008..0.658 rows=1,002 loops=1)

  • Filter: ((active_flag = 1) AND (t_fatura_basim_turu = 1))
  • Rows Removed by Filter: 128
21.          

SubPlan (for Hash Semi Join)

22. 16.077 80.385 ↑ 8.0 1 16,077

Unique (cost=27.03..27.07 rows=8 width=4) (actual time=0.005..0.005 rows=1 loops=16,077)

23. 16.077 64.308 ↑ 8.0 1 16,077

Sort (cost=27.03..27.05 rows=8 width=4) (actual time=0.004..0.004 rows=1 loops=16,077)

  • Sort Key: fd.tesis_id
  • Sort Method: quicksort Memory: 25kB
24. 48.231 48.231 ↑ 8.0 1 16,077

Index Scan using idx_fatura_detay_active_flag on skys_fatura_detay fd (cost=0.42..26.91 rows=8 width=4) (actual time=0.003..0.003 rows=1 loops=16,077)

  • Index Cond: (fatura_id = y.fatura_id)
25. 0.146 7.260 ↓ 1.3 1,111 1

Subquery Scan on *SELECT* 2 (cost=61.06..677.58 rows=848 width=50) (actual time=0.108..7.260 rows=1,111 loops=1)

26. 1.647 7.114 ↓ 1.3 1,111 1

Hash Semi Join (cost=61.06..669.10 rows=848 width=220) (actual time=0.107..7.114 rows=1,111 loops=1)

  • Hash Cond: (y_1.kullanici_id = k1_1.kullanici_id)
27. 5.384 5.384 ↑ 1.0 17,201 1

Seq Scan on skys_fatura y_1 (cost=0.00..553.36 rows=17,236 width=46) (actual time=0.006..5.384 rows=17,201 loops=1)

28. 0.005 0.083 ↑ 1.0 32 1

Hash (cost=60.65..60.65 rows=33 width=4) (actual time=0.083..0.083 rows=32 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
29. 0.019 0.078 ↑ 1.0 32 1

HashAggregate (cost=59.99..60.32 rows=33 width=4) (actual time=0.074..0.078 rows=32 loops=1)

  • Group Key: k1_1.kullanici_id
30. 0.059 0.059 ↑ 1.0 32 1

Index Scan using idx_active_flag_basim_turu on skys_kullanici k1_1 (cost=0.28..59.91 rows=33 width=4) (actual time=0.038..0.059 rows=32 loops=1)

  • Index Cond: ((t_fatura_basim_turu = 2) AND (active_flag = 1))
31. 99.152 377.215 ↓ 1.0 305,617 1

Hash (cost=29,547.58..29,547.58 rows=303,958 width=25) (actual time=377.215..377.215 rows=305,617 loops=1)

  • Buckets: 262144 Batches: 2 Memory Usage: 10139kB
32. 278.063 278.063 ↓ 1.0 305,638 1

Seq Scan on muh_fatura mf (cost=0.00..29,547.58 rows=303,958 width=25) (actual time=0.016..278.063 rows=305,638 loops=1)

33. 0.447 1.091 ↓ 1.0 1,130 1

Hash (cost=74.10..74.10 rows=1,110 width=48) (actual time=1.091..1.091 rows=1,130 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 107kB
34. 0.644 0.644 ↓ 1.0 1,130 1

Seq Scan on skys_kullanici kk (cost=0.00..74.10 rows=1,110 width=48) (actual time=0.009..0.644 rows=1,130 loops=1)

35. 0.497 0.904 ↑ 1.0 757 1

Hash (cost=24.57..24.57 rows=757 width=291) (actual time=0.904..0.904 rows=757 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 95kB
36. 0.407 0.407 ↑ 1.0 757 1

Seq Scan on skys_fatura_tahsil x2 (cost=0.00..24.57 rows=757 width=291) (actual time=0.016..0.407 rows=757 loops=1)

37.          

SubPlan (for WindowAgg)

38. 0.000 17.200 ↑ 1.0 1 17,200

Aggregate (cost=14.81..14.82 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=17,200)

39. 17.200 17.200 ↓ 0.0 0 17,200

Index Scan using idx_fat_tahsil_tahsil_dt_fatura_id on skys_fatura_tahsil ft (cost=0.28..14.80 rows=1 width=8) (actual time=0.000..0.001 rows=0 loops=17,200)

  • Index Cond: ((tahsil_dt <= x2.tahsil_dt) AND (fatura_id = x2.fatura_id))
40.          

SubPlan (for WindowAgg)

41. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_kullanici on skys_kullanici k (cost=0.28..8.29 rows=1 width=44) (never executed)

  • Index Cond: (kullanici_id = x.kullanici_id)
42. 0.000 0.000 ↓ 0.0 0

Index Scan using tesis_id_active_flag_t_tesis_tur_id_idx on skys_tesis t (cost=0.28..8.30 rows=1 width=14) (never executed)

  • Index Cond: (tesis_id = x.tesis_id)
43.          

SubPlan (for Subquery Scan)

44. 0.000 0.000 ↓ 0.0 0

Limit (cost=8.46..8.47 rows=1 width=8) (never executed)

45. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.46..8.47 rows=1 width=8) (never executed)

46. 0.000 0.000 ↓ 0.0 0

Index Scan using w5_file_attachment_table_id_table_pk_idx on w5_file_attachment cx (cost=0.43..8.45 rows=1 width=0) (never executed)

  • Index Cond: ((table_id = 2706) AND ((table_pk)::text = (z.pkpkpk_id)::text))
  • Filter: (customization_id = 0)
47. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.43..16.52 rows=1 width=32) (never executed)

48. 0.000 0.000 ↓ 0.0 0

Index Scan using w5_comment_summary_pkey on w5_comment_summary cx_1 (cost=0.15..8.17 rows=1 width=528) (never executed)

  • Index Cond: ((table_id = 2706) AND ((table_pk)::text = (z.pkpkpk_id)::text) AND (customization_id = 0))
49. 0.000 0.000 ↓ 0.0 0

Index Scan using w5_comment_pkey on w5_comment cxx (cost=0.29..8.31 rows=1 width=30) (never executed)

  • Index Cond: ((comment_id = cx_1.last_comment_id) AND (customization_id = 0))
50. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_kullanici on skys_kullanici x_1 (cost=0.28..8.29 rows=1 width=44) (never executed)

  • Index Cond: (kullanici_id = z.kullanici_id)
51. 0.000 0.000 ↓ 0.0 0

Index Scan using tesis_id_active_flag_t_tesis_tur_id_idx on skys_tesis x_2 (cost=0.28..8.30 rows=1 width=14) (never executed)

  • Index Cond: (tesis_id = z.tesis_id)
52. 0.000 0.000 ↓ 0.0 0

Seq Scan on t_skys_uretim_tuketim x_3 (cost=0.00..1.02 rows=1 width=108) (never executed)

  • Filter: (uretim_tuketim_id = z.t_skys_uretim_tuketim)
53. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_fatura_cins on t_skys_fatura_cins x_4 (cost=0.15..8.17 rows=1 width=108) (never executed)

  • Index Cond: (fatura_cins_id = z.t_skys_fatura_cins)
54. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_tahsilat_sure_durum on t_skys_tahsilat_sure_durum x_5 (cost=0.15..8.17 rows=1 width=108) (never executed)

  • Index Cond: (tahsilat_sure_durum_id = z.t_skys_tahsilat_sure_durum)
  • Rows Removed by Filter: 17200
55. 67.380 5,345.070 ↑ 1.1 17,200 1

WindowAgg (cost=509,162.13..1,037,944.65 rows=18,606 width=465) (actual time=2,073.372..5,345.070 rows=17,200 loops=1)

56. 344.208 2,078.490 ↑ 1.1 17,200 1

Sort (cost=509,162.13..509,208.65 rows=18,606 width=425) (actual time=2,073.184..2,078.490 rows=17,200 loops=1)

  • Sort Key: ("right"(("*SELECT* 1".fatura_no)::text, 13)), x2.fatura_tahsil_id
  • Sort Method: quicksort Memory: 5240kB
57. 27.541 1,734.282 ↑ 1.1 17,200 1

Hash Left Join (cost=35,661.07..507,842.64 rows=18,606 width=425) (actual time=1,147.275..1,734.282 rows=17,200 loops=1)

  • Hash Cond: ("*SELECT* 1".fatura_id = x2.fatura_id)
58. 6.066 1,706.231 ↑ 1.1 17,188 1

Hash Join (cost=35,627.01..507,438.49 rows=18,336 width=102) (actual time=1,146.740..1,706.231 rows=17,188 loops=1)

  • Hash Cond: ("*SELECT* 1".kullanici_id = kk.kullanici_id)
59. 112.104 1,699.476 ↑ 1.1 17,188 1

Hash Left Join (cost=35,539.04..507,098.40 rows=18,336 width=58) (actual time=1,146.038..1,699.476 rows=17,188 loops=1)

  • Hash Cond: (("*SELECT* 1".fatura_no)::text = (mf.fatura_no)::text)
60. 1.957 443.246 ↑ 1.1 17,188 1

Append (cost=113.99..468,334.62 rows=18,084 width=50) (actual time=0.871..443.246 rows=17,188 loops=1)

61. 2.696 411.853 ↑ 1.1 16,077 1

Subquery Scan on *SELECT* 1 (cost=113.99..467,657.04 rows=17,236 width=50) (actual time=0.869..411.853 rows=16,077 loops=1)

62. 19.225 409.157 ↑ 1.1 16,077 1

Hash Semi Join (cost=113.99..467,484.68 rows=17,236 width=220) (actual time=0.869..409.157 rows=16,077 loops=1)

  • Hash Cond: (y.kullanici_id = k1.kullanici_id)
63. 51.523 51.523 ↑ 1.0 17,201 1

Seq Scan on skys_fatura y (cost=0.00..553.36 rows=17,236 width=46) (actual time=0.011..51.523 rows=17,201 loops=1)

64. 0.147 0.792 ↓ 1.0 1,002 1

Hash (cost=101.72..101.72 rows=981 width=4) (actual time=0.792..0.792 rows=1,002 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 44kB
65. 0.319 0.645 ↓ 1.0 1,002 1

HashAggregate (cost=82.10..91.91 rows=981 width=4) (actual time=0.543..0.645 rows=1,002 loops=1)

  • Group Key: k1.kullanici_id
66. 0.326 0.326 ↓ 1.0 1,002 1

Seq Scan on skys_kullanici k1 (cost=0.00..79.65 rows=981 width=4) (actual time=0.006..0.326 rows=1,002 loops=1)

  • Filter: ((active_flag = 1) AND (t_fatura_basim_turu = 1))
  • Rows Removed by Filter: 128
67.          

SubPlan (for Hash Semi Join)

68. 0.000 337.617 ↑ 8.0 1 16,077

Unique (cost=27.03..27.07 rows=8 width=4) (actual time=0.021..0.021 rows=1 loops=16,077)

69. 112.539 337.617 ↑ 8.0 1 16,077

Sort (cost=27.03..27.05 rows=8 width=4) (actual time=0.021..0.021 rows=1 loops=16,077)

  • Sort Key: fd.tesis_id
  • Sort Method: quicksort Memory: 25kB
70. 225.078 225.078 ↑ 8.0 1 16,077

Index Scan using idx_fatura_detay_active_flag on skys_fatura_detay fd (cost=0.42..26.91 rows=8 width=4) (actual time=0.011..0.014 rows=1 loops=16,077)

  • Index Cond: (fatura_id = y.fatura_id)
71. 0.155 29.436 ↓ 1.3 1,111 1

Subquery Scan on *SELECT* 2 (cost=61.06..677.58 rows=848 width=50) (actual time=0.115..29.436 rows=1,111 loops=1)

72. 1.669 29.281 ↓ 1.3 1,111 1

Hash Semi Join (cost=61.06..669.10 rows=848 width=220) (actual time=0.114..29.281 rows=1,111 loops=1)

  • Hash Cond: (y_1.kullanici_id = k1_1.kullanici_id)
73. 27.524 27.524 ↑ 1.0 17,201 1

Seq Scan on skys_fatura y_1 (cost=0.00..553.36 rows=17,236 width=46) (actual time=0.006..27.524 rows=17,201 loops=1)

74. 0.004 0.088 ↑ 1.0 32 1

Hash (cost=60.65..60.65 rows=33 width=4) (actual time=0.088..0.088 rows=32 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
75. 0.019 0.084 ↑ 1.0 32 1

HashAggregate (cost=59.99..60.32 rows=33 width=4) (actual time=0.079..0.084 rows=32 loops=1)

  • Group Key: k1_1.kullanici_id
76. 0.065 0.065 ↑ 1.0 32 1

Index Scan using idx_active_flag_basim_turu on skys_kullanici k1_1 (cost=0.28..59.91 rows=33 width=4) (actual time=0.038..0.065 rows=32 loops=1)

  • Index Cond: ((t_fatura_basim_turu = 2) AND (active_flag = 1))
77. 194.927 1,144.126 ↓ 1.0 305,617 1

Hash (cost=29,547.58..29,547.58 rows=303,958 width=25) (actual time=1,144.126..1,144.126 rows=305,617 loops=1)

  • Buckets: 262144 Batches: 2 Memory Usage: 10139kB
78. 949.199 949.199 ↓ 1.0 305,638 1

Seq Scan on muh_fatura mf (cost=0.00..29,547.58 rows=303,958 width=25) (actual time=0.014..949.199 rows=305,638 loops=1)

79. 0.253 0.689 ↓ 1.0 1,130 1

Hash (cost=74.10..74.10 rows=1,110 width=48) (actual time=0.688..0.689 rows=1,130 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 107kB
80. 0.436 0.436 ↓ 1.0 1,130 1

Seq Scan on skys_kullanici kk (cost=0.00..74.10 rows=1,110 width=48) (actual time=0.008..0.436 rows=1,130 loops=1)

81. 0.266 0.510 ↑ 1.0 757 1

Hash (cost=24.58..24.58 rows=758 width=291) (actual time=0.510..0.510 rows=757 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 95kB
82. 0.244 0.244 ↑ 1.0 757 1

Seq Scan on skys_fatura_tahsil x2 (cost=0.00..24.58 rows=758 width=291) (actual time=0.013..0.244 rows=757 loops=1)

83.          

SubPlan (for WindowAgg)

84. 0.000 3,199.200 ↑ 1.0 1 17,200

Aggregate (cost=28.38..28.39 rows=1 width=32) (actual time=0.186..0.186 rows=1 loops=17,200)

85. 3,199.200 3,199.200 ↓ 0.0 0 17,200

Seq Scan on skys_fatura_tahsil ft (cost=0.00..28.37 rows=1 width=8) (actual time=0.181..0.186 rows=0 loops=17,200)

  • Filter: ((tahsil_dt <= x2.tahsil_dt) AND (fatura_id = x2.fatura_id))
  • Rows Removed by Filter: 757
86.          

SubPlan (for Index Scan)

87. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_kullanici on skys_kullanici k (cost=0.28..8.29 rows=1 width=44) (never executed)

  • Index Cond: (kullanici_id = x.kullanici_id)
88. 0.000 0.000 ↓ 0.0 0

Index Scan using tesis_id_active_flag_t_tesis_tur_id_idx on skys_tesis t (cost=0.28..8.30 rows=1 width=14) (never executed)

  • Index Cond: (tesis_id = x.tesis_id)
89. 0.000 0.000 ↓ 0.0 0

Limit (cost=8.46..8.47 rows=1 width=8) (never executed)

90. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.46..8.47 rows=1 width=8) (never executed)

91. 0.000 0.000 ↓ 0.0 0

Index Scan using w5_file_attachment_table_id_table_pk_idx on w5_file_attachment cx (cost=0.43..8.45 rows=1 width=0) (never executed)

  • Index Cond: ((table_id = 2706) AND ((table_pk)::text = (z.pkpkpk_id)::text))
  • Filter: (customization_id = 0)
92. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.43..16.52 rows=1 width=32) (never executed)

93. 0.000 0.000 ↓ 0.0 0

Index Scan using w5_comment_summary_pkey on w5_comment_summary cx_1 (cost=0.15..8.17 rows=1 width=528) (never executed)

  • Index Cond: ((table_id = 2706) AND ((table_pk)::text = (z.pkpkpk_id)::text) AND (customization_id = 0))
94. 0.000 0.000 ↓ 0.0 0

Index Scan using w5_comment_pkey on w5_comment cxx (cost=0.29..8.31 rows=1 width=30) (never executed)

  • Index Cond: ((comment_id = cx_1.last_comment_id) AND (customization_id = 0))
95. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_kullanici on skys_kullanici x_1 (cost=0.28..8.29 rows=1 width=44) (never executed)

  • Index Cond: (kullanici_id = z.kullanici_id)
96. 0.000 0.000 ↓ 0.0 0

Index Scan using tesis_id_active_flag_t_tesis_tur_id_idx on skys_tesis x_2 (cost=0.28..8.30 rows=1 width=14) (never executed)

  • Index Cond: (tesis_id = z.tesis_id)
97. 0.000 0.000 ↓ 0.0 0

Seq Scan on t_skys_uretim_tuketim x_3 (cost=0.00..1.02 rows=1 width=108) (never executed)

  • Filter: (uretim_tuketim_id = z.t_skys_uretim_tuketim)
98. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_fatura_cins on t_skys_fatura_cins x_4 (cost=0.15..8.17 rows=1 width=108) (never executed)

  • Index Cond: (fatura_cins_id = z.t_skys_fatura_cins)
99. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_tahsilat_sure_durum on t_skys_tahsilat_sure_durum x_5 (cost=0.15..8.17 rows=1 width=108) (never executed)

  • Index Cond: (tahsilat_sure_durum_id = z.t_skys_tahsilat_sure_durum)
Planning time : 5.569 ms
Execution time : 5,391.826 ms