explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iVcn

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 108,127.955 ↑ 1.0 1 1

Unique (cost=6,350,212.27..6,350,212.30 rows=1 width=99) (actual time=108,127.954..108,127.955 rows=1 loops=1)

2. 0.136 108,127.954 ↑ 1.0 1 1

Sort (cost=6,350,212.27..6,350,212.28 rows=1 width=99) (actual time=108,127.953..108,127.954 rows=1 loops=1)

  • Sort Key: e.belge_tarih DESC, e.evrak_sayi, e.konu_ozet, e.evrak_no, e.dosya_id, e.evrak_tipi, e.tarih, e.olusturan_tipi, e.referans_id, e.toplanti_tarih, e.guvenlik_kodu
  • Sort Method: quicksort Memory: 25kB
3. 0.018 108,127.818 ↑ 1.0 1 1

Nested Loop Semi Join (cost=5,890,268.64..6,350,212.26 rows=1 width=99) (actual time=108,127.803..108,127.818 rows=1 loops=1)

4. 0.091 0.091 ↑ 1.0 1 1

Index Scan using evrak_pkey on evrak e (cost=0.43..8.45 rows=1 width=99) (actual time=0.079..0.091 rows=1 loops=1)

  • Index Cond: (id = '1633474'::numeric)
5. 0.054 108,127.709 ↑ 38,300.0 1 1

Hash Join (cost=5,890,268.21..6,350,203.80 rows=38,300 width=16) (actual time=108,127.709..108,127.709 rows=1 loops=1)

  • Hash Cond: (eav.islem_yapilan_birim_id = bns.birim_id)
6. 628.679 108,092.437 ↑ 38,300.5 2 1

Subquery Scan on eav (cost=5,890,106.21..6,349,714.22 rows=76,601 width=32) (actual time=108,092.434..108,092.437 rows=2 loops=1)

  • Filter: (eav.evrak_id = '1633474'::numeric)
  • Rows Removed by Filter: 3330939
7. 665.533 107,463.758 ↑ 4.6 3,330,941 1

Subquery Scan on tt (cost=5,890,106.21..6,158,210.88 rows=15,320,267 width=44) (actual time=104,325.995..107,463.758 rows=3,330,941 loops=1)

8.          

Initplan (forSubquery Scan)

9. 0.002 0.002 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1)

10. 1,591.695 106,798.223 ↑ 4.6 3,330,941 1

Unique (cost=5,890,106.20..6,005,008.20 rows=15,320,267 width=32) (actual time=104,325.962..106,798.223 rows=3,330,941 loops=1)

11. 7,708.221 105,206.528 ↑ 3.3 4,674,913 1

Sort (cost=5,890,106.20..5,928,406.86 rows=15,320,267 width=32) (actual time=104,325.952..105,206.528 rows=4,674,913 loops=1)

  • Sort Key: e_1.id, eil.islem_yapilan_birim
  • Sort Method: external sort Disk: 131688kB
12. 529.863 97,498.307 ↑ 3.1 4,914,766 1

Append (cost=2,848,776.61..3,695,162.17 rows=15,320,267 width=32) (actual time=54,659.517..97,498.307 rows=4,914,766 loops=1)

13. 4,742.414 83,086.364 ↑ 3.9 3,400,782 1

Unique (cost=2,848,776.61..2,947,614.80 rows=13,178,425 width=12) (actual time=54,659.505..83,086.364 rows=3,400,782 loops=1)

14. 39,926.888 78,343.950 ↓ 1.1 14,114,841 1

Sort (cost=2,848,776.61..2,881,722.68 rows=13,178,425 width=12) (actual time=54,659.484..78,343.950 rows=14,114,841 loops=1)

  • Sort Key: e_1.id, eil.islem_yapilan_birim
  • Sort Method: external merge Disk: 323208kB
15. 7,765.826 38,417.062 ↓ 1.1 14,114,841 1

Hash Join (cost=93,426.71..1,065,099.51 rows=13,178,425 width=12) (actual time=1,630.760..38,417.062 rows=14,114,841 loops=1)

  • Hash Cond: (eil.islem_yapilan_birim = b.birim_id)
16. 29,028.762 30,650.071 ↓ 1.1 14,175,691 1

Hash Join (cost=93,297.43..884,276.46 rows=13,178,425 width=12) (actual time=1,629.549..30,650.071 rows=14,175,691 loops=1)

  • Hash Cond: (eil.evrak_id = e_1.id)
  • -> Seq Scan on evrak_islem_log eil (cost=0.00..447761.52 rows=13898852 width=12) (actual time=0.037..13881.662 rows=14539134 lo
17. 732.172 1,621.309 ↑ 1.1 1,503,537 1

Hash (cost=67,228.87..67,228.87 rows=1,588,925 width=6) (actual time=1,621.309..1,621.309 rows=1,503,537 loops=1)

  • Buckets: 1048576 Batches: 4 Memory Usage: 22504kB
18. 889.137 889.137 ↑ 1.1 1,503,537 1

Seq Scan on evrak e_1 (cost=0.00..67,228.87 rows=1,588,925 width=6) (actual time=0.047..889.137 rows=1,503,537 loops=1)

  • Filter: belge
  • Rows Removed by Filter: 81825
19. 0.308 1.165 ↓ 1.0 665 1

Hash (cost=121.28..121.28 rows=640 width=6) (actual time=1.165..1.165 rows=665 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 34kB
20. 0.857 0.857 ↓ 1.0 665 1

Index Only Scan using birim_pkey on birim b (cost=0.28..121.28 rows=640 width=6) (actual time=0.082..0.857 rows=665 loops=1)

  • Heap Fetches: 364
21. 734.278 13,882.080 ↑ 1.4 1,513,984 1

Unique (cost=578,280.89..594,344.70 rows=2,141,842 width=12) (actual time=11,644.981..13,882.080 rows=1,513,984 loops=1)

22. 3,505.928 13,147.802 ↑ 1.1 1,941,828 1

Sort (cost=578,280.89..583,635.49 rows=2,141,842 width=12) (actual time=11,644.978..13,147.802 rows=1,941,828 loops=1)

  • Sort Key: e_2.id, k.birim_id
  • Sort Method: external merge Disk: 44480kB
23. 2,435.272 9,641.874 ↑ 1.1 1,941,828 1

Hash Join (cost=145,132.10..316,455.20 rows=2,141,842 width=12) (actual time=2,085.133..9,641.874 rows=1,941,828 loops=1)

  • Hash Cond: (ek.klasor_id = k.id)
24. 3,151.428 6,221.486 ↑ 1.1 1,941,828 1

Hash Join (cost=94,723.21..212,361.98 rows=2,141,842 width=12) (actual time=1,094.588..6,221.486 rows=1,941,828 loops=1)

  • Hash Cond: (ek.evrak_id = e_2.id)
25. 1,980.538 1,980.538 ↑ 1.1 1,941,828 1

Seq Scan on evrak_klasor ek (cost=0.00..58,046.14 rows=2,141,842 width=12) (actual time=0.060..1,980.538 rows=1,941,828 loops=1)

  • Filter: aktif
  • Rows Removed by Filter: 80537
26. 602.859 1,089.520 ↑ 1.1 1,585,362 1

Hash (cost=67,228.87..67,228.87 rows=1,675,787 width=6) (actual time=1,089.520..1,089.520 rows=1,585,362 loops=1)

  • Buckets: 1048576 Batches: 4 Memory Usage: 23274kB
27. 486.661 486.661 ↑ 1.1 1,585,362 1

Seq Scan on evrak e_2 (cost=0.00..67,228.87 rows=1,675,787 width=6) (actual time=0.014..486.661 rows=1,585,362 loops=1)

28. 428.309 985.116 ↑ 1.0 675,235 1

Hash (cost=38,605.73..38,605.73 rows=678,973 width=12) (actual time=985.116..985.116 rows=675,235 loops=1)

  • Buckets: 1048576 Batches: 2 Memory Usage: 23312kB
29. 556.807 556.807 ↑ 1.0 675,235 1

Seq Scan on klasor k (cost=0.00..38,605.73 rows=678,973 width=12) (actual time=0.039..556.807 rows=675,235 loops=1)

30. 0.028 35.218 ↑ 35.0 1 1

Hash (cost=161.57..161.57 rows=35 width=6) (actual time=35.218..35.218 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
31. 0.032 35.190 ↑ 35.0 1 1

HashAggregate (cost=161.22..161.57 rows=35 width=6) (actual time=35.188..35.190 rows=1 loops=1)

  • Group Key: bns.birim_id
32. 35.158 35.158 ↑ 35.0 1 1

Index Only Scan using birim_nested_set_x1 on birim_nested_set bns (cost=0.40..161.13 rows=35 width=6) (actual time=0.139..35.158 rows=1 loops=1)

  • Index Cond: ((left_value >= 1249) AND (right_value <= 1250))
  • Heap Fetches: 0
Planning time : 15.385 ms
Execution time : 108,270.201 ms