explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wiA7

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 33,522.487 ↑ 1.0 1 1

Aggregate (cost=3,533,935.07..3,533,935.08 rows=1 width=8) (actual time=33,522.487..33,522.487 rows=1 loops=1)

2. 0.083 33,522.477 ↑ 1.0 1 1

Nested Loop (cost=3,533,926.76..3,533,935.07 rows=1 width=6) (actual time=33,522.465..33,522.477 rows=1 loops=1)

3. 0.011 33,522.318 ↑ 1.0 1 1

Unique (cost=3,533,926.34..3,533,926.61 rows=1 width=6) (actual time=33,522.308..33,522.318 rows=1 loops=1)

4. 0.090 33,522.307 ↑ 3.0 18 1

Sort (cost=3,533,926.34..3,533,926.47 rows=54 width=6) (actual time=33,522.307..33,522.307 rows=18 loops=1)

  • Sort Key: evrak1_.id
  • Sort Method: quicksort Memory: 25kB
5. 0.065 33,522.217 ↑ 3.0 18 1

Nested Loop Left Join (cost=3,241,272.30..3,533,924.78 rows=54 width=6) (actual time=33,457.754..33,522.217 rows=18 loops=1)

6. 0.077 33,522.088 ↑ 3.0 2 1

Nested Loop Semi Join (cost=3,241,271.87..3,533,870.71 rows=6 width=6) (actual time=33,457.645..33,522.088 rows=2 loops=1)

7. 218.772 33,521.901 ↑ 1.1 10 1

Hash Join (cost=3,241,271.72..3,533,868.83 rows=11 width=22) (actual time=33,457.475..33,521.901 rows=10 loops=1)

  • Hash Cond: (tt.evrak_id = evrak1_.id)
8. 231.083 33,293.780 ↑ 4.2 2,217,515 1

Subquery Scan on tt (cost=3,241,239.30..3,405,093.62 rows=9,363,104 width=40) (actual time=32,179.029..33,293.780 rows=2,217,515 loops=1)

9. 526.409 33,062.697 ↑ 4.2 2,217,515 1

Unique (cost=3,241,239.30..3,311,462.58 rows=9,363,104 width=32) (actual time=32,179.016..33,062.697 rows=2,217,515 loops=1)

10. 2,893.793 32,536.288 ↑ 3.1 2,986,693 1

Sort (cost=3,241,239.30..3,264,647.06 rows=9,363,104 width=32) (actual time=32,179.014..32,536.288 rows=2,986,693 loops=1)

  • Sort Key: e.id, eil.islem_yapilan_birim
  • Sort Method: quicksort Memory: 238,306kB
11. 235.170 29,642.495 ↑ 3.1 2,986,693 1

Append (cost=1,594,479.20..1,933,038.48 rows=9,363,104 width=32) (actual time=22,094.032..29,642.495 rows=2,986,693 loops=1)

12. 1,651.774 25,512.452 ↑ 3.9 2,121,804 1

Unique (cost=1,594,479.20..1,655,751.34 rows=8,169,618 width=11) (actual time=22,094.030..25,512.452 rows=2,121,804 loops=1)

13. 8,781.348 23,860.678 ↓ 1.0 8,364,342 1

Sort (cost=1,594,479.20..1,614,903.25 rows=8,169,618 width=11) (actual time=22,094.029..23,860.678 rows=8,364,342 loops=1)

  • Sort Key: e.id, eil.islem_yapilan_birim
  • Sort Method: external merge Disk: 180,608kB
14. 3,894.517 15,079.330 ↓ 1.0 8,364,342 1

Hash Join (cost=59,459.34..516,913.51 rows=8,169,618 width=11) (actual time=596.554..15,079.330 rows=8,364,342 loops=1)

  • Hash Cond: (eil.islem_yapilan_birim = b.birim_id)
15. 7,488.694 11,184.686 ↓ 1.0 8,394,816 1

Hash Join (cost=59,450.87..404,858.73 rows=8,169,618 width=11) (actual time=596.400..11,184.686 rows=8,394,816 loops=1)

  • Hash Cond: (eil.evrak_id = e.id)
16. 3,104.198 3,104.198 ↓ 1.0 8,496,535 1

Seq Scan on evrak_islem_log eil (cost=0.00..232,141.13 rows=8,418,813 width=11) (actual time=0.005..3,104.198 rows=8,496,535 loops=1)

17. 235.918 591.794 ↓ 1.0 840,738 1

Hash (cost=48,963.67..48,963.67 rows=838,976 width=6) (actual time=591.794..591.794 rows=840,738 loops=1)

  • Buckets: 1,048,576 Batches: 1 Memory Usage: 40,213kB
18. 355.876 355.876 ↓ 1.0 840,738 1

Seq Scan on evrak e (cost=0.00..48,963.67 rows=838,976 width=6) (actual time=0.028..355.876 rows=840,738 loops=1)

  • Filter: belge
  • Rows Removed by Filter: 27,081
19. 0.048 0.127 ↑ 1.2 92 1

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

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

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

21. 1,097.719 3,894.873 ↑ 1.4 864,889 1

HashAggregate (cost=171,721.24..183,656.10 rows=1,193,486 width=11) (actual time=3,470.600..3,894.873 rows=864,889 loops=1)

  • Group Key: e_1.id, k.birim_id
22. 604.685 2,797.154 ↓ 1.0 1,214,005 1

Hash Join (cost=96,089.48..165,753.81 rows=1,193,486 width=11) (actual time=582.239..2,797.154 rows=1,214,005 loops=1)

  • Hash Cond: (ek.klasor_id = k.id)
23. 958.307 1,953.644 ↓ 1.0 1,214,005 1

Hash Join (cost=59,770.76..113,024.66 rows=1,193,486 width=12) (actual time=342.673..1,953.644 rows=1,214,005 loops=1)

  • Hash Cond: (ek.evrak_id = e_1.id)
24. 654.735 654.735 ↓ 1.0 1,214,005 1

Seq Scan on evrak_klasor ek (cost=0.00..36,843.47 rows=1,193,486 width=12) (actual time=0.018..654.735 rows=1,214,005 loops=1)

  • Filter: aktif
  • Rows Removed by Filter: 81,535
25. 155.475 340.602 ↓ 1.0 867,819 1

Hash (cost=48,963.67..48,963.67 rows=864,567 width=6) (actual time=340.602..340.602 rows=867,819 loops=1)

  • Buckets: 1,048,576 Batches: 1 Memory Usage: 41,244kB
26. 185.127 185.127 ↓ 1.0 867,819 1

Seq Scan on evrak e_1 (cost=0.00..48,963.67 rows=864,567 width=6) (actual time=0.013..185.127 rows=867,819 loops=1)

27. 83.140 238.825 ↓ 1.0 461,450 1

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

  • Buckets: 524,288 Batches: 1 Memory Usage: 23,990kB
28. 155.685 155.685 ↓ 1.0 461,450 1

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

29. 0.020 9.349 ↓ 4.0 4 1

Hash (cost=32.41..32.41 rows=1 width=6) (actual time=9.349..9.349 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
30. 9.329 9.329 ↓ 4.0 4 1

Index Scan using idx_evrak_no_silme_tarih on evrak evrak1_ (cost=0.42..32.41 rows=1 width=6) (actual time=9.283..9.329 rows=4 loops=1)

  • Index Cond: ((evrak_no = '43598'::numeric) AND (silme_tarih IS NULL))
  • Filter: (belge AND (belge_tarih >= '2020-03-01 00:00:00'::timestamp without time zone) AND (belge_tarih < '2020-06-25 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 4
31. 0.110 0.110 ↓ 0.0 0 10

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=10)

  • Index Cond: ((birim_id = tt.islem_yapilan_birim_id) AND (left_value >= 145) AND (right_value <= 150))
  • Heap Fetches: 0
32. 0.064 0.064 ↑ 2.3 9 2

Index Only Scan using ix_eil_onceki_hareket_id on evrak_islem_log evrakislem2_ (cost=0.43..8.80 rows=21 width=6) (actual time=0.025..0.032 rows=9 loops=2)

  • Index Cond: (evrak_id = evrak1_.id)
  • Heap Fetches: 6
33. 0.076 0.076 ↑ 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.074..0.076 rows=1 loops=1)

  • Index Cond: (id = evrak1_.id)
  • Heap Fetches: 1
Planning time : 12.335 ms
Execution time : 33,572.104 ms