explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cUZF

Settings
# exclusive inclusive rows x rows loops node
1. 0.138 11,550.487 ↓ 100.0 100 1

Subquery Scan on z (cost=21,947.47..21,966.19 rows=1 width=1,300) (actual time=11,549.468..11,550.487 rows=100 loops=1)

2. 0.016 11,549.849 ↓ 100.0 100 1

Limit (cost=21,947.47..21,947.53 rows=1 width=250) (actual time=11,549.433..11,549.849 rows=100 loops=1)

3. 0.456 11,549.833 ↓ 100.0 100 1

Result (cost=21,947.47..21,947.53 rows=1 width=250) (actual time=11,549.430..11,549.833 rows=100 loops=1)

4. 3.148 11,549.377 ↓ 100.0 100 1

Sort (cost=21,947.47..21,947.47 rows=1 width=234) (actual time=11,549.352..11,549.377 rows=100 loops=1)

  • Sort Key: k.kullanici_ad, (COALESCE(x.uretim_tuketim_id, x.buretim_tuketim_id)) DESC, t.tesis_ad
  • Sort Method: top-N heapsort Memory: 70kB
5. 86.765 11,546.229 ↓ 1,097.0 1,097 1

Nested Loop (cost=21,778.16..21,947.46 rows=1 width=234) (actual time=11,294.685..11,546.229 rows=1,097 loops=1)

  • Join Filter: (t.kullanici_id = k.kullanici_id)
  • Rows Removed by Join Filter: 1166111
6. 1.095 11,300.399 ↓ 1,097.0 1,097 1

Nested Loop (cost=21,778.16..21,860.67 rows=1 width=192) (actual time=11,294.656..11,300.399 rows=1,097 loops=1)

7. 1.540 11,297.110 ↓ 1,097.0 1,097 1

Merge Semi Join (cost=21,777.88..21,859.99 rows=1 width=178) (actual time=11,294.629..11,297.110 rows=1,097 loops=1)

  • Merge Cond: ((COALESCE(x.tesis_id, x.btesis_id)) = t_1.tesis_id)
8. 2.539 11,295.027 ↓ 2,460.0 2,460 1

Sort (cost=21,777.60..21,777.60 rows=1 width=174) (actual time=11,294.575..11,295.027 rows=2,460 loops=1)

  • Sort Key: (COALESCE(x.tesis_id, x.btesis_id))
  • Sort Method: quicksort Memory: 750kB
9. 0.895 11,292.488 ↓ 2,460.0 2,460 1

Subquery Scan on x (cost=21,777.57..21,777.59 rows=1 width=174) (actual time=11,291.284..11,292.488 rows=2,460 loops=1)

10. 4.001 11,291.593 ↓ 2,460.0 2,460 1

Sort (cost=21,777.57..21,777.58 rows=1 width=176) (actual time=11,291.282..11,291.593 rows=2,460 loops=1)

  • Sort Key: (COALESCE(w.uretim_tuketim_id, y.buretim_tuketim_id)) DESC
  • Sort Method: quicksort Memory: 750kB
11. 556.071 11,287.592 ↓ 2,460.0 2,460 1

Nested Loop (cost=21,492.20..21,777.56 rows=1 width=176) (actual time=173.809..11,287.592 rows=2,460 loops=1)

  • Join Filter: ((w.tesis_id = y.btesis_id) AND (w.sira = y.bsira) AND (w.uretim_tuketim_id = y.buretim_tuketim_id))
  • Rows Removed by Join Filter: 7077017
12. 0.902 103.125 ↓ 2,623.0 2,623 1

Subquery Scan on w (cost=10,746.83..10,890.45 rows=1 width=87) (actual time=96.562..103.125 rows=2,623 loops=1)

  • Filter: ((w.donem_yil = 2019) AND (w.t_donem_ay = 6))
13. 2.994 102.223 ↓ 1.5 2,623 1

WindowAgg (cost=10,746.83..10,863.61 rows=1,789 width=91) (actual time=96.556..102.223 rows=2,623 loops=1)

14. 1.728 99.229 ↓ 1.5 2,623 1

Group (cost=10,746.83..10,827.83 rows=1,789 width=87) (actual time=96.536..99.229 rows=2,623 loops=1)

  • Group Key: a.tesis_id, a.guc_baslangic_dt, a.uretim_tuketim_id, a.detay_skb_sabit_mny, a.detay_skb_degisken_mny, a.detay_sistem_isletim_mny, a.detay_ekhb_mny, a.detay_iletim_ek (...)
15. 2.759 97.501 ↓ 1.5 2,623 1

Sort (cost=10,746.83..10,751.33 rows=1,800 width=87) (actual time=96.534..97.501 rows=2,623 loops=1)

  • Sort Key: a.tesis_id, a.guc_baslangic_dt, a.uretim_tuketim_id, a.detay_skb_sabit_mny, a.detay_skb_degisken_mny, a.detay_sistem_isletim_mny, a.detay_ekhb_mny, a.detay_ilet (...)
  • Sort Method: quicksort Memory: 465kB
16. 94.742 94.742 ↓ 1.5 2,623 1

Seq Scan on skys_fatura_detay a (cost=0.00..10,649.51 rows=1,800 width=87) (actual time=0.089..94.742 rows=2,623 loops=1)

  • Filter: ((donem_yil = 2019) AND (t_donem_ay = 6))
  • Rows Removed by Filter: 259173
17. 1,033.462 10,628.396 ↓ 2,699.0 2,699 2,623

Subquery Scan on y (cost=10,745.36..10,887.09 rows=1 width=87) (actual time=0.031..4.052 rows=2,699 loops=2,623)

  • Filter: ((y.bdonem_yil = 2019) AND (y.bt_donem_ay = 5))
18. 5,500.431 9,594.934 ↓ 1.5 2,699 2,623

WindowAgg (cost=10,745.36..10,860.60 rows=1,766 width=91) (actual time=0.031..3.658 rows=2,699 loops=2,623)

19. 3,328.587 4,094.503 ↓ 1.5 2,699 2,623

Group (cost=10,745.36..10,825.28 rows=1,766 width=87) (actual time=0.030..1.561 rows=2,699 loops=2,623)

  • Group Key: b.tesis_id, b.guc_baslangic_dt, b.uretim_tuketim_id, b.detay_skb_sabit_mny, b.detay_skb_degisken_mny, b.detay_sistem_isletim_mny, b.detay_ekhb_mny, b.detay_iletim_ek (...)
20. 690.555 765.916 ↓ 1.5 2,699 2,623

Sort (cost=10,745.36..10,749.80 rows=1,776 width=87) (actual time=0.030..0.292 rows=2,699 loops=2,623)

  • Sort Key: b.tesis_id, b.guc_baslangic_dt, b.uretim_tuketim_id, b.detay_skb_sabit_mny, b.detay_skb_degisken_mny, b.detay_sistem_isletim_mny, b.detay_ekhb_mny, b.detay_ilet (...)
  • Sort Method: quicksort Memory: 476kB
21. 75.361 75.361 ↓ 1.5 2,699 1

Seq Scan on skys_fatura_detay b (cost=0.00..10,649.51 rows=1,776 width=87) (actual time=0.198..75.361 rows=2,699 loops=1)

  • Filter: ((donem_yil = 2019) AND (t_donem_ay = 5))
  • Rows Removed by Filter: 259097
22. 0.543 0.543 ↑ 1.0 802 1

Index Only Scan using tesis_id_active_flag_t_tesis_tur_id_idx on skys_tesis t_1 (cost=0.28..80.34 rows=816 width=4) (actual time=0.044..0.543 rows=802 loops=1)

  • Index Cond: (t_tesis_tur_id = 3)
  • Heap Fetches: 289
23. 2.194 2.194 ↑ 1.0 1 1,097

Index Scan using tesis_id_idx on skys_tesis t (cost=0.28..0.67 rows=1 width=22) (actual time=0.002..0.002 rows=1 loops=1,097)

  • Index Cond: (tesis_id = t_1.tesis_id)
24. 159.065 159.065 ↓ 1.0 1,064 1,097

Seq Scan on skys_kullanici k (cost=0.00..73.57 rows=1,057 width=48) (actual time=0.001..0.145 rows=1,064 loops=1,097)

25.          

SubPlan (forSubquery Scan)

26. 0.200 0.200 ↑ 1.0 1 100

Index Scan using tesis_id_active_flag_t_tesis_tur_id_idx on skys_tesis x_1 (cost=0.28..8.30 rows=1 width=14) (actual time=0.001..0.002 rows=1 loops=100)

  • Index Cond: (tesis_id = z.tesis_id)
27. 0.100 0.100 ↑ 1.0 1 100

Seq Scan on t_skys_uretim_tuketim x_2 (cost=0.00..1.02 rows=1 width=108) (actual time=0.001..0.001 rows=1 loops=100)

  • Filter: (uretim_tuketim_id = z.uretim_tuketim_id)
  • Rows Removed by Filter: 2
28. 0.100 0.100 ↑ 1.0 1 100

Index Scan using tesis_id_active_flag_t_tesis_tur_id_idx on skys_tesis x_3 (cost=0.28..8.30 rows=1 width=14) (actual time=0.001..0.001 rows=1 loops=100)

  • Index Cond: (tesis_id = z.btesis_id)
29. 0.100 0.100 ↑ 1.0 1 100

Seq Scan on t_skys_uretim_tuketim x_4 (cost=0.00..1.02 rows=1 width=108) (actual time=0.000..0.001 rows=1 loops=100)

  • Filter: (uretim_tuketim_id = z.buretim_tuketim_id)
  • Rows Removed by Filter: 2
Planning time : 3.238 ms
Execution time : 11,551.038 ms