explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vrwv

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 18,639.740 ↑ 1.0 1 1

Unique (cost=2,523,444.15..2,523,444.18 rows=1 width=125) (actual time=18,639.740..18,639.740 rows=1 loops=1)

2. 0.043 18,639.740 ↑ 1.0 1 1

Sort (cost=2,523,444.15..2,523,444.15 rows=1 width=125) (actual time=18,639.740..18,639.740 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.016 18,639.697 ↑ 1.0 1 1

Nested Loop Semi Join (cost=2,311,035.95..2,523,444.14 rows=1 width=125) (actual time=18,639.688..18,639.697 rows=1 loops=1)

4. 0.044 0.044 ↑ 1.0 1 1

Index Scan using evrak_pkey on evrak e (cost=0.42..8.44 rows=1 width=125) (actual time=0.036..0.044 rows=1 loops=1)

  • Index Cond: (id = '1278052'::numeric)
5. 0.040 18,639.637 ↑ 17,686.0 1 1

Hash Join (cost=2,311,035.53..2,523,435.68 rows=17,686 width=16) (actual time=18,639.637..18,639.637 rows=1 loops=1)

  • Hash Cond: (eav.islem_yapilan_birim_id = bns.birim_id)
6. 165.560 18,639.500 ↑ 11,791.0 3 1

Subquery Scan on eav (cost=2,311,027.72..2,523,265.15 rows=35,373 width=32) (actual time=18,639.499..18,639.500 rows=3 loops=1)

  • Filter: (eav.evrak_id = '1278052'::numeric)
  • Rows Removed by Filter: 1630634
7. 167.176 18,473.940 ↑ 4.3 1,630,637 1

Subquery Scan on tt (cost=2,311,027.72..2,434,832.89 rows=7,074,581 width=40) (actual time=17,694.596..18,473.940 rows=1,630,637 loops=1)

8. 371.608 18,306.764 ↑ 4.3 1,630,637 1

Unique (cost=2,311,027.72..2,364,087.08 rows=7,074,581 width=32) (actual time=17,694.594..18,306.764 rows=1,630,637 loops=1)

9. 1,754.832 17,935.156 ↑ 3.2 2,184,710 1

Sort (cost=2,311,027.72..2,328,714.17 rows=7,074,581 width=32) (actual time=17,694.589..17,935.156 rows=2,184,710 loops=1)

  • Sort Key: e_1.id, eil.islem_yapilan_birim
  • Sort Method: quicksort Memory: 201412kB
10. 143.697 16,180.324 ↑ 3.2 2,199,637 1

Append (cost=1,085,846.33..1,336,878.10 rows=7,074,581 width=32) (actual time=11,806.860..16,180.324 rows=2,199,637 loops=1)

11. 1,128.196 13,829.404 ↑ 3.9 1,564,417 1

Unique (cost=1,085,846.33..1,132,157.93 rows=6,174,880 width=11) (actual time=11,806.860..13,829.404 rows=1,564,417 loops=1)

12. 5,998.154 12,701.208 ↑ 1.0 6,172,338 1

Sort (cost=1,085,846.33..1,101,283.53 rows=6,174,880 width=11) (actual time=11,806.858..12,701.208 rows=6,172,338 loops=1)

  • Sort Key: e_1.id, eil.islem_yapilan_birim
  • Sort Method: external merge Disk: 133248kB
13. 1,814.172 6,703.054 ↑ 1.0 6,172,338 1

Hash Join (cost=34,475.85..389,382.24 rows=6,174,880 width=11) (actual time=448.877..6,703.054 rows=6,172,338 loops=1)

  • Hash Cond: (eil.islem_yapilan_birim = b.birim_id)
14. 3,501.904 4,888.752 ↓ 1.0 6,194,521 1

Hash Join (cost=34,459.81..304,650.95 rows=6,174,880 width=11) (actual time=448.724..4,888.752 rows=6,194,521 loops=1)

  • Hash Cond: (eil.evrak_id = e_1.id)
15. 944.128 944.128 ↑ 1.0 6,269,216 1

Seq Scan on evrak_islem_log eil (cost=0.00..184,585.98 rows=6,361,698 width=11) (actual time=0.006..944.128 rows=6,269,216 loops=1)

16. 225.387 442.720 ↑ 1.0 618,728 1

Hash (cost=26,725.03..26,725.03 rows=618,782 width=6) (actual time=442.720..442.720 rows=618,728 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 31757kB
17. 217.333 217.333 ↑ 1.0 618,728 1

Seq Scan on evrak e_1 (cost=0.00..26,725.03 rows=618,782 width=6) (actual time=0.009..217.333 rows=618,728 loops=1)

  • Filter: belge
  • Rows Removed by Filter: 19167
18. 0.053 0.130 ↓ 1.0 92 1

Hash (cost=14.91..14.91 rows=91 width=5) (actual time=0.130..0.130 rows=92 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
19. 0.077 0.077 ↓ 1.0 92 1

Seq Scan on birim b (cost=0.00..14.91 rows=91 width=5) (actual time=0.007..0.077 rows=92 loops=1)

20. 595.256 2,207.223 ↑ 1.4 635,220 1

HashAggregate (cost=124,977.35..133,974.36 rows=899,701 width=11) (actual time=2,002.378..2,207.223 rows=635,220 loops=1)

  • Group Key: e_2.id, k.birim_id
21. 353.466 1,611.967 ↑ 1.0 891,864 1

Hash Join (cost=71,012.54..120,478.84 rows=899,701 width=11) (actual time=576.154..1,611.967 rows=891,864 loops=1)

  • Hash Cond: (ek.klasor_id = k.id)
22. 493.303 1,003.580 ↑ 1.0 891,864 1

Hash Join (cost=34,693.82..71,789.24 rows=899,701 width=12) (actual time=319.995..1,003.580 rows=891,864 loops=1)

  • Hash Cond: (ek.evrak_id = e_2.id)
23. 193.811 193.811 ↑ 1.0 891,864 1

Seq Scan on evrak_klasor ek (cost=0.00..24,724.53 rows=899,701 width=12) (actual time=0.024..193.811 rows=891,864 loops=1)

  • Filter: aktif
  • Rows Removed by Filter: 68766
24. 158.913 316.466 ↓ 1.0 637,895 1

Hash (cost=26,725.03..26,725.03 rows=637,503 width=6) (actual time=316.466..316.466 rows=637,895 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 32487kB
25. 157.553 157.553 ↓ 1.0 637,895 1

Seq Scan on evrak e_2 (cost=0.00..26,725.03 rows=637,503 width=6) (actual time=0.013..157.553 rows=637,895 loops=1)

26. 112.516 254.921 ↓ 1.0 458,772 1

Hash (cost=30,803.32..30,803.32 rows=441,232 width=11) (actual time=254.921..254.921 rows=458,772 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 23875kB
27. 142.405 142.405 ↓ 1.0 458,772 1

Seq Scan on klasor k (cost=0.00..30,803.32 rows=441,232 width=11) (actual time=0.032..142.405 rows=458,772 loops=1)

28. 0.009 0.097 ↑ 5.7 3 1

Hash (cost=7.59..7.59 rows=17 width=5) (actual time=0.097..0.097 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
29. 0.013 0.088 ↑ 5.7 3 1

HashAggregate (cost=7.42..7.59 rows=17 width=5) (actual time=0.087..0.088 rows=3 loops=1)

  • Group Key: bns.birim_id
30. 0.075 0.075 ↑ 5.7 3 1

Seq Scan on birim_nested_set bns (cost=0.00..7.38 rows=17 width=5) (actual time=0.035..0.075 rows=3 loops=1)

  • Filter: ((left_value >= 43) AND (right_value <= 48))
  • Rows Removed by Filter: 89
Planning time : 3.794 ms
Execution time : 18,691.064 ms