explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LJbZ

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 25,166.869 ↑ 1.0 1 1

Aggregate (cost=3,157,590.89..3,157,590.90 rows=1 width=8) (actual time=25,166.869..25,166.869 rows=1 loops=1)

2. 0.018 25,166.853 ↑ 1.0 1 1

Nested Loop (cost=3,157,582.62..3,157,590.89 rows=1 width=6) (actual time=25,166.846..25,166.853 rows=1 loops=1)

3. 0.006 25,166.816 ↑ 1.0 1 1

Unique (cost=3,157,582.20..3,157,582.43 rows=1 width=6) (actual time=25,166.810..25,166.816 rows=1 loops=1)

4. 0.131 25,166.810 ↑ 1.4 34 1

Sort (cost=3,157,582.20..3,157,582.31 rows=46 width=6) (actual time=25,166.809..25,166.810 rows=34 loops=1)

  • Sort Key: evrak1_.id
  • Sort Method: quicksort Memory: 26kB
5. 0.034 25,166.679 ↑ 1.4 34 1

Nested Loop Left Join (cost=2,886,959.45..3,157,580.93 rows=46 width=6) (actual time=25,158.768..25,166.679 rows=34 loops=1)

6. 0.064 25,166.577 ↑ 2.5 2 1

Nested Loop Semi Join (cost=2,886,959.02..3,157,520.46 rows=5 width=6) (actual time=25,158.701..25,166.577 rows=2 loops=1)

7. 206.683 25,166.428 ↑ 2.0 5 1

Hash Join (cost=2,886,958.75..3,157,517.51 rows=10 width=22) (actual time=25,158.564..25,166.428 rows=5 loops=1)

  • Hash Cond: (tt.evrak_id = evrak1_.id)
8. 209.947 24,959.456 ↑ 4.1 2,137,711 1

Subquery Scan on tt (cost=2,886,926.14..3,038,438.99 rows=8,657,877 width=40) (actual time=23,979.106..24,959.456 rows=2,137,711 loops=1)

9. 493.595 24,749.509 ↑ 4.1 2,137,711 1

Unique (cost=2,886,926.14..2,951,860.22 rows=8,657,877 width=32) (actual time=23,979.101..24,749.509 rows=2,137,711 loops=1)

10. 2,312.997 24,255.914 ↑ 3.0 2,877,288 1

Sort (cost=2,886,926.14..2,908,570.83 rows=8,657,877 width=32) (actual time=23,979.098..24,255.914 rows=2,877,288 loops=1)

  • Sort Key: e.id, eil.islem_yapilan_birim
  • Sort Method: quicksort Memory: 233177kB
11. 224.117 21,942.917 ↑ 3.0 2,877,288 1

Append (cost=1,348,132.86..1,682,149.57 rows=8,657,877 width=32) (actual time=16,130.967..21,942.917 rows=2,877,288 loops=1)

12. 1,666.581 19,135.376 ↑ 3.6 2,043,952 1

Unique (cost=1,348,132.86..1,403,861.24 rows=7,430,451 width=11) (actual time=16,130.961..19,135.376 rows=2,043,952 loops=1)

13. 7,953.559 17,468.795 ↓ 1.1 8,070,987 1

Sort (cost=1,348,132.86..1,366,708.99 rows=7,430,451 width=11) (actual time=16,130.943..17,468.795 rows=8,070,987 loops=1)

  • Sort Key: e.id, eil.islem_yapilan_birim
  • Sort Method: external merge Disk: 174272kB
14. 2,519.314 9,515.236 ↓ 1.1 8,070,987 1

Hash Join (cost=68,918.88..500,131.96 rows=7,430,451 width=11) (actual time=706.459..9,515.236 rows=8,070,987 loops=1)

  • Hash Cond: (eil.islem_yapilan_birim = b.birim_id)
15. 4,905.755 6,995.756 ↓ 1.1 8,100,074 1

Hash Join (cost=68,910.40..398,217.32 rows=7,430,451 width=11) (actual time=706.263..6,995.756 rows=8,100,074 loops=1)

  • Hash Cond: (eil.evrak_id = e.id)
16. 1,388.293 1,388.293 ↓ 1.1 8,198,441 1

Seq Scan on evrak_islem_log eil (cost=0.00..226,265.57 rows=7,663,157 width=11) (actual time=0.013..1,388.293 rows=8,198,441 loops=1)

17. 296.252 701.708 ↑ 1.0 809,285 1

Hash (cost=58,550.49..58,550.49 rows=828,793 width=6) (actual time=701.708..701.708 rows=809,285 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 39015kB
18. 405.456 405.456 ↑ 1.0 809,285 1

Seq Scan on evrak e (cost=0.00..58,550.49 rows=828,793 width=6) (actual time=0.035..405.456 rows=809,285 loops=1)

  • Filter: belge
  • Rows Removed by Filter: 26235
19. 0.053 0.166 ↑ 1.2 92 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
20. 0.113 0.113 ↑ 1.2 92 1

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

21. 741.347 2,583.424 ↑ 1.5 833,336 1

HashAggregate (cost=179,435.30..191,709.56 rows=1,227,426 width=11) (actual time=2,302.185..2,583.424 rows=833,336 loops=1)

  • Group Key: e_1.id, k.birim_id
22. 396.223 1,842.077 ↑ 1.0 1,170,784 1

Hash Join (cost=103,575.11..173,298.17 rows=1,227,426 width=11) (actual time=604.326..1,842.077 rows=1,170,784 loops=1)

  • Hash Cond: (ek.klasor_id = k.id)
23. 844.384 1,204.234 ↑ 1.0 1,170,784 1

Hash Join (cost=67,256.39..120,102.34 rows=1,227,426 width=12) (actual time=361.930..1,204.234 rows=1,170,784 loops=1)

  • Hash Cond: (ek.evrak_id = e_1.id)
  • -> Seq Scan on evrak_klasor ek (cost=0.00..35968.85 rows=1227426 width=12) (actual time=0.031..249.699rows=1170784 loops=1)
  • Filter: aktif
  • Rows Removed by Filter: 78777
24. 148.573 359.850 ↑ 1.0 835,520 1

Hash (cost=56,572.02..56,572.02 rows=854,749 width=6) (actual time=359.850..359.850 rows=835,520 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 40014kB
25. 211.277 211.277 ↑ 1.0 835,520 1

Index Only Scan using evrak_pkey on evrak e_1 (cost=0.42..56,572.02 rows=854,749 width=6) (actual time=0.079..211.277 rows=835,520 loops=1)

  • Heap Fetches: 174125
26. 90.297 241.620 ↓ 1.0 461,259 1

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

  • Buckets: 524288 Batches: 1 Memory Usage: 23982kB
27. 151.323 151.323 ↓ 1.0 461,259 1

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

28. 0.014 0.289 ↑ 1.0 1 1

Hash (cost=32.60..32.60 rows=1 width=6) (actual time=0.289..0.289 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
29. 0.275 0.275 ↑ 1.0 1 1

Index Scan using idx_evrak_no_silme_tarih on evrak evrak1_ (cost=0.42..32.60 rows=1 width=6) (actual time=0.274..0.275 rows=1 loops=1)

  • Index Cond: ((evrak_no = '29258'::numeric) AND (silme_tarih IS NULL))
  • Filter: (belge AND (belge_tarih >= '2020-04-15 00:00:00'::timestamp without time zone) AND (belge_tarih < '2020-05-17 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 7
30. 0.085 0.085 ↓ 0.0 0 5

Index Only Scan using birim_nested_set_birim_id_left_rigth_idx on birim_nested_set birimneste4_ (cost=0.27..0.29 rows=1 width=5) (actual time=0.017..0.017 rows=0 loops=5)

  • Index Cond: ((birim_id = tt.islem_yapilan_birim_id) AND (left_value >= 145) AND (right_value <= 150))
  • Heap Fetches: 0
31. 0.068 0.068 ↑ 1.2 17 2

Index Only Scan using ix_eil_onceki_hareket_id on evrak_islem_log evrakislem2_ (cost=0.43..11.88 rows=21 width=6) (actual time=0.022..0.034 rows=17 loops=2)

  • Index Cond: (evrak_id = evrak1_.id)
  • Heap Fetches: 34
32. 0.019 0.019 ↑ 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.018..0.019 rows=1 loops=1)

  • Index Cond: (id = evrak1_.id)
  • Heap Fetches: 0
Planning time : 15.149 ms
Execution time : 25,209.642 ms