explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TsD6

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 26,630.220 ↑ 1.0 1 1

Aggregate (cost=3,635,753.11..3,635,753.12 rows=1 width=8) (actual time=26,630.220..26,630.220 rows=1 loops=1)

2. 0.047 26,630.212 ↑ 1.0 1 1

Nested Loop (cost=3,635,744.80..3,635,753.11 rows=1 width=6) (actual time=26,630.205..26,630.212 rows=1 loops=1)

3. 0.007 26,630.139 ↑ 1.0 1 1

Unique (cost=3,635,744.38..3,635,744.65 rows=1 width=6) (actual time=26,630.133..26,630.139 rows=1 loops=1)

4. 0.102 26,630.132 ↑ 3.0 18 1

Sort (cost=3,635,744.38..3,635,744.51 rows=54 width=6) (actual time=26,630.131..26,630.132 rows=18 loops=1)

  • Sort Key: evrak1_.id
  • Sort Method: quicksort Memory: 25kB
5. 0.045 26,630.030 ↑ 3.0 18 1

Nested Loop Left Join (cost=3,332,462.41..3,635,742.82 rows=54 width=6) (actual time=26,528.809..26,630.030 rows=18 loops=1)

6. 0.086 26,629.919 ↑ 6.0 1 1

Nested Loop Semi Join (cost=3,332,461.98..3,635,688.91 rows=6 width=6) (actual time=26,528.701..26,629.919 rows=1 loops=1)

7. 266.019 26,629.778 ↑ 2.2 5 1

Hash Join (cost=3,332,461.84..3,635,687.04 rows=11 width=22) (actual time=26,528.565..26,629.778 rows=5 loops=1)

  • Hash Cond: (tt.evrak_id = evrak1_.id)
8. 269.292 26,363.520 ↑ 4.2 2,287,365 1

Subquery Scan on tt (cost=3,332,429.51..3,502,235.57 rows=9,703,203 width=40) (actual time=25,040.628..26,363.520 rows=2,287,365 loops=1)

9. 612.949 26,094.228 ↑ 4.2 2,287,365 1

Unique (cost=3,332,429.51..3,405,203.54 rows=9,703,203 width=32) (actual time=25,040.614..26,094.228 rows=2,287,365 loops=1)

10. 2,771.947 25,481.279 ↑ 3.1 3,083,577 1

Sort (cost=3,332,429.51..3,356,687.52 rows=9,703,203 width=32) (actual time=25,040.612..25,481.279 rows=3,083,577 loops=1)

  • Sort Key: e.id, eil.islem_yapilan_birim
  • Sort Method: quicksort Memory: 242,847kB
11. 189.904 22,709.332 ↑ 3.1 3,083,577 1

Append (cost=1,642,531.75..1,974,212.87 rows=9,703,203 width=32) (actual time=16,418.194..22,709.332 rows=3,083,577 loops=1)

12. 1,547.564 19,704.015 ↑ 3.9 2,190,023 1

Unique (cost=1,642,531.75..1,705,929.28 rows=8,453,004 width=11) (actual time=16,418.190..19,704.015 rows=2,190,023 loops=1)

13. 8,150.563 18,156.451 ↓ 1.0 8,624,126 1

Sort (cost=1,642,531.75..1,663,664.26 rows=8,453,004 width=11) (actual time=16,418.184..18,156.451 rows=8,624,126 loops=1)

  • Sort Key: e.id, eil.islem_yapilan_birim
  • Sort Method: external merge Disk: 186,216kB
14. 2,769.277 10,005.888 ↓ 1.0 8,624,126 1

Hash Join (cost=48,936.90..525,507.49 rows=8,453,004 width=11) (actual time=677.029..10,005.888 rows=8,624,126 loops=1)

  • Hash Cond: (eil.islem_yapilan_birim = b.birim_id)
15. 5,680.561 7,236.494 ↓ 1.0 8,655,627 1

Hash Join (cost=48,928.42..409,611.15 rows=8,453,004 width=11) (actual time=676.891..7,236.494 rows=8,655,627 loops=1)

  • Hash Cond: (eil.evrak_id = e.id)
16. 882.953 882.953 ↓ 1.0 8,760,103 1

Seq Scan on evrak_islem_log eil (cost=0.00..243,462.32 rows=8,717,432 width=11) (actual time=0.008..882.953 rows=8,760,103 loops=1)

17. 291.547 672.980 ↓ 1.0 868,677 1

Hash (cost=38,094.37..38,094.37 rows=866,724 width=6) (actual time=672.980..672.980 rows=868,677 loops=1)

  • Buckets: 1,048,576 Batches: 1 Memory Usage: 41,277kB
18. 381.433 381.433 ↓ 1.0 868,677 1

Seq Scan on evrak e (cost=0.00..38,094.37 rows=866,724 width=6) (actual time=0.019..381.433 rows=868,677 loops=1)

  • Filter: belge
  • Rows Removed by Filter: 27,777
19. 0.045 0.117 ↑ 1.2 92 1

Hash (cost=7.10..7.10 rows=110 width=5) (actual time=0.117..0.117 rows=92 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
20. 0.072 0.072 ↑ 1.2 92 1

Seq Scan on birim b (cost=0.00..7.10 rows=110 width=5) (actual time=0.014..0.072 rows=92 loops=1)

21. 762.423 2,815.413 ↑ 1.4 893,554 1

HashAggregate (cost=158,749.57..171,251.56 rows=1,250,199 width=11) (actual time=2,575.093..2,815.413 rows=893,554 loops=1)

  • Group Key: e_1.id, k.birim_id
22. 502.050 2,052.990 ↓ 1.0 1,252,659 1

Hash Join (cost=80,733.78..152,498.58 rows=1,250,199 width=11) (actual time=494.718..2,052.990 rows=1,252,659 loops=1)

  • Hash Cond: (ek.klasor_id = k.id)
23. 1,059.057 1,303.916 ↓ 1.0 1,252,659 1

Hash Join (cost=44,415.06..98,989.62 rows=1,250,199 width=12) (actual time=246.857..1,303.916 rows=1,252,659 loops=1)

  • Hash Cond: (ek.evrak_id = e_1.id)
  • -> Seq Scan on evrak_klasor ek (cost=0.00..37384.32 rows=1,250,199 width=12) (actual time=0.019..339.433rows=1,252,659 loops=1)
  • Filter: aktif
  • Rows Removed by Filter: 81,990
24. 144.801 244.859 ↓ 1.0 896,454 1

Hash (cost=33,242.10..33,242.10 rows=893,837 width=6) (actual time=244.859..244.859 rows=896,454 loops=1)

  • Buckets: 1,048,576 Batches: 1 Memory Usage: 42,335kB
25. 100.058 100.058 ↓ 1.0 896,454 1

Index Only Scan using evrak_pkey on evrak e_1 (cost=0.42..33,242.10 rows=893,837 width=6) (actual time=0.082..100.058 rows=896,454 loops=1)

  • Heap Fetches: 3,315
26. 84.629 247.024 ↓ 1.0 461,619 1

Hash (cost=30,803.32..30,803.32 rows=441,232 width=11) (actual time=247.024..247.024 rows=461,619 loops=1)

  • Buckets: 524,288 Batches: 1 Memory Usage: 23,998kB
27. 162.395 162.395 ↓ 1.0 461,619 1

Seq Scan on klasor k (cost=0.00..30,803.32 rows=441,232 width=11) (actual time=0.038..162.395 rows=461,619 loops=1)

28. 0.015 0.239 ↑ 1.0 1 1

Hash (cost=32.31..32.31 rows=1 width=6) (actual time=0.239..0.239 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
29. 0.224 0.224 ↑ 1.0 1 1

Index Scan using idx_evrak_no_silme_tarih on evrak evrak1_ (cost=0.42..32.31 rows=1 width=6) (actual time=0.223..0.224 rows=1 loops=1)

  • Index Cond: ((evrak_no = '31603'::numeric) AND (silme_tarih IS NULL))
  • Filter: (belge AND (belge_tarih >= '2020-04-01 00:00:00'::timestamp without time zone) AND (belge_tarih < '2020-07-26 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 7
30. 0.055 0.055 ↓ 0.0 0 5

Index Only Scan using birim_nested_set_birim_id_left_rigth_idx on birim_nested_set birimneste4_ (cost=0.14..0.17 rows=1 width=5) (actual time=0.011..0.011 rows=0 loops=5)

  • Index Cond: ((birim_id = tt.islem_yapilan_birim_id) AND (left_value >= 128) AND (right_value <= 129))
  • Heap Fetches: 0
31. 0.066 0.066 ↑ 1.1 18 1

Index Only Scan using ix_eil_onceki_hareket_id on evrak_islem_log evrakislem2_ (cost=0.43..8.79 rows=20 width=6) (actual time=0.064..0.066 rows=18 loops=1)

  • Index Cond: (evrak_id = evrak1_.id)
  • Heap Fetches: 0
32. 0.026 0.026 ↑ 1.0 1 1

Index Only Scan using evrak_pkey on evrak evrak0_ (cost=0.42..8.44 rows=1 width=6) (actual time=0.026..0.026 rows=1 loops=1)

  • Index Cond: (id = evrak1_.id)
  • Heap Fetches: 0
Planning time : 11.057 ms
Execution time : 26,685.308 ms