explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kUCS

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 4,323.257 ↓ 0.0 0 1

Subquery Scan on z (cost=1,029,831.49..1,029,890.44 rows=1 width=1,283) (actual time=4,323.257..4,323.257 rows=0 loops=1)

2. 0.012 4,323.256 ↓ 0.0 0 1

Sort (cost=1,029,831.49..1,029,831.49 rows=1 width=919) (actual time=4,323.256..4,323.256 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.000 4,323.244 ↓ 0.0 0 1

WindowAgg (cost=509,162.50..1,029,831.48 rows=1 width=919) (actual time=4,323.244..4,323.244 rows=0 loops=1)

4. 34.585 4,323.244 ↓ 0.0 0 1

Subquery Scan on x (cost=509,162.50..1,029,814.87 rows=1 width=433) (actual time=4,323.244..4,323.244 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
5. 68.236 4,288.659 ↑ 1.1 17,200 1

WindowAgg (cost=509,162.50..1,029,349.42 rows=18,618 width=465) (actual time=998.972..4,288.659 rows=17,200 loops=1)

6. 261.287 1,004.023 ↑ 1.1 17,200 1

Sort (cost=509,162.50..509,209.05 rows=18,618 width=425) (actual time=998.816..1,004.023 rows=17,200 loops=1)

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

Hash Left Join (cost=35,660.35..507,842.07 rows=18,618 width=425) (actual time=469.397..742.736 rows=17,200 loops=1)

  • Hash Cond: ("*SELECT* 1".fatura_id = x2.fatura_id)
8. 31.671 721.365 ↑ 1.1 17,188 1

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

  • Hash Cond: ("*SELECT* 1".kullanici_id = kk.kullanici_id)
9. 62.656 689.188 ↑ 1.1 17,188 1

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

  • Hash Cond: (("*SELECT* 1".fatura_no)::text = (mf.fatura_no)::text)
10. 1.861 160.019 ↑ 1.1 17,188 1

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

11. 2.715 150.686 ↑ 1.1 16,077 1

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

12. 28.240 147.971 ↑ 1.1 16,077 1

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

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

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

14. 0.132 0.771 ↓ 1.0 1,002 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 44kB
15. 0.330 0.639 ↓ 1.0 1,002 1

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

  • Group Key: k1.kullanici_id
16. 0.309 0.309 ↓ 1.0 1,002 1

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

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

SubPlan (for Hash Semi Join)

18. 16.077 112.539 ↑ 8.0 1 16,077

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

19. 32.154 96.462 ↑ 8.0 1 16,077

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

  • Sort Key: fd.tesis_id
  • Sort Method: quicksort Memory: 25kB
20. 64.308 64.308 ↑ 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.004..0.004 rows=1 loops=16,077)

  • Index Cond: (fatura_id = y.fatura_id)
21. 0.139 7.472 ↓ 1.3 1,111 1

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

22. 1.748 7.333 ↓ 1.3 1,111 1

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

  • Hash Cond: (y_1.kullanici_id = k1_1.kullanici_id)
23. 5.520 5.520 ↑ 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.008..5.520 rows=17,201 loops=1)

24. 0.006 0.065 ↑ 1.0 32 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
25. 0.018 0.059 ↑ 1.0 32 1

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

  • Group Key: k1_1.kullanici_id
26. 0.041 0.041 ↑ 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.013..0.041 rows=32 loops=1)

  • Index Cond: ((t_fatura_basim_turu = 2) AND (active_flag = 1))
27. 100.475 466.513 ↓ 1.0 305,616 1

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

  • Buckets: 262144 Batches: 2 Memory Usage: 10139kB
28. 366.038 366.038 ↓ 1.0 305,637 1

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

29. 0.227 0.506 ↓ 1.0 1,130 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 107kB
30. 0.279 0.279 ↓ 1.0 1,130 1

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

31. 0.260 0.476 ↓ 1.0 756 1

Hash (cost=24.26..24.26 rows=726 width=291) (actual time=0.476..0.476 rows=756 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 95kB
32. 0.216 0.216 ↓ 1.0 756 1

Seq Scan on skys_fatura_tahsil x2 (cost=0.00..24.26 rows=726 width=291) (actual time=0.009..0.216 rows=756 loops=1)

33.          

SubPlan (for WindowAgg)

34. 34.400 3,216.400 ↑ 1.0 1 17,200

Aggregate (cost=27.90..27.91 rows=1 width=32) (actual time=0.185..0.187 rows=1 loops=17,200)

35. 3,182.000 3,182.000 ↓ 0.0 0 17,200

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

  • Filter: ((tahsil_dt <= x2.tahsil_dt) AND (fatura_id = x2.fatura_id))
  • Rows Removed by Filter: 756
36.          

SubPlan (for WindowAgg)

37. 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)
38. 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)
39.          

SubPlan (for Subquery Scan)

40. 0.000 0.000 ↓ 0.0 0

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

41. 0.000 0.000 ↓ 0.0 0

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

42. 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)
43. 0.000 0.000 ↓ 0.0 0

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

44. 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))
45. 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))
46. 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)
47. 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)
48. 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)
49. 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)
50. 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 : 2.268 ms
Execution time : 4,323.825 ms