explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qvxN

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 35,885.772 ↑ 1.0 1 1

Aggregate (cost=3,885,456.99..3,885,457.00 rows=1 width=8) (actual time=35,885.772..35,885.772 rows=1 loops=1)

2. 0.005 35,885.765 ↑ 1.0 1 1

Nested Loop (cost=3,885,448.68..3,885,456.99 rows=1 width=6) (actual time=35,885.762..35,885.765 rows=1 loops=1)

3. 0.004 35,885.744 ↑ 1.0 1 1

Unique (cost=3,885,448.25..3,885,448.52 rows=1 width=6) (actual time=35,885.741..35,885.744 rows=1 loops=1)

4. 0.040 35,885.740 ↑ 5.4 10 1

Sort (cost=3,885,448.25..3,885,448.39 rows=54 width=6) (actual time=35,885.740..35,885.740 rows=10 loops=1)

  • Sort Key: evrak1_.id
  • Sort Method: quicksort Memory: 25kB
5. 0.007 35,885.700 ↑ 5.4 10 1

Nested Loop Left Join (cost=3,582,166.29..3,885,446.70 rows=54 width=6) (actual time=35,779.438..35,885.700 rows=10 loops=1)

6. 0.018 35,857.359 ↑ 6.0 1 1

Nested Loop Semi Join (cost=3,582,165.85..3,885,392.79 rows=6 width=6) (actual time=35,751.102..35,857.359 rows=1 loops=1)

7. 223.147 35,856.969 ↑ 2.8 4 1

Hash Join (cost=3,582,165.71..3,885,390.91 rows=11 width=22) (actual time=35,750.715..35,856.969 rows=4 loops=1)

  • Hash Cond: (tt.evrak_id = evrak1_.id)
8. 227.704 35,561.690 ↑ 4.2 2,287,618 1

Subquery Scan on tt (cost=3,582,124.46..3,751,930.52 rows=9,703,203 width=40) (actual time=33,622.745..35,561.690 rows=2,287,618 loops=1)

9. 537.520 35,333.986 ↑ 4.2 2,287,618 1

Unique (cost=3,582,124.46..3,654,898.49 rows=9,703,203 width=32) (actual time=33,622.742..35,333.986 rows=2,287,618 loops=1)

10. 1,956.369 34,796.466 ↑ 3.1 3,083,894 1

Sort (cost=3,582,124.46..3,606,382.47 rows=9,703,203 width=32) (actual time=33,622.740..34,796.466 rows=3,083,894 loops=1)

  • Sort Key: e.id, eil.islem_yapilan_birim
  • Sort Method: external merge Disk: 66,680kB
11. 194.764 32,840.097 ↑ 3.1 3,083,894 1

Append (cost=1,734,435.75..2,223,907.82 rows=9,703,203 width=32) (actual time=18,950.686..32,840.097 rows=3,083,894 loops=1)

12. 1,633.346 26,090.828 ↑ 3.9 2,190,273 1

Unique (cost=1,734,435.75..1,797,833.28 rows=8,453,004 width=11) (actual time=18,950.683..26,090.828 rows=2,190,273 loops=1)

13. 11,112.057 24,457.482 ↓ 1.0 8,625,171 1

Sort (cost=1,734,435.75..1,755,568.26 rows=8,453,004 width=11) (actual time=18,950.680..24,457.482 rows=8,625,171 loops=1)

  • Sort Key: e.id, eil.islem_yapilan_birim
  • Sort Method: external merge Disk: 186,136kB
14. 2,730.046 13,345.425 ↓ 1.0 8,625,171 1

Hash Join (cost=52,322.90..617,411.49 rows=8,453,004 width=11) (actual time=1,591.797..13,345.425 rows=8,625,171 loops=1)

  • Hash Cond: (eil.islem_yapilan_birim = b.birim_id)
15. 4,722.611 10,615.207 ↓ 1.0 8,656,676 1

Hash Join (cost=52,314.42..501,515.15 rows=8,453,004 width=11) (actual time=1,591.596..10,615.207 rows=8,656,676 loops=1)

  • Hash Cond: (eil.evrak_id = e.id)
16. 4,308.595 4,308.595 ↓ 1.0 8,761,397 1

Seq Scan on evrak_islem_log eil (cost=0.00..243,462.32 rows=8,717,432 width=11) (actual time=0.006..4,308.595 rows=8,761,397 loops=1)

17. 458.428 1,584.001 ↓ 1.0 868,797 1

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

  • Buckets: 1,048,576 Batches: 2 Memory Usage: 24,733kB
18. 1,125.573 1,125.573 ↓ 1.0 868,797 1

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

  • Filter: belge
  • Rows Removed by Filter: 27,804
19. 0.042 0.172 ↑ 1.2 92 1

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

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

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

21. 247.166 6,554.505 ↑ 1.4 893,621 1

Unique (cost=319,666.02..329,042.51 rows=1,250,199 width=11) (actual time=6,059.290..6,554.505 rows=893,621 loops=1)

22. 1,147.879 6,307.339 ↓ 1.0 1,252,751 1

Sort (cost=319,666.02..322,791.52 rows=1,250,199 width=11) (actual time=6,059.289..6,307.339 rows=1,252,751 loops=1)

  • Sort Key: e_1.id, k.birim_id
  • Sort Method: external merge Disk: 27,080kB
23. 708.742 5,159.460 ↓ 1.0 1,252,751 1

Hash Join (cost=84,225.78..171,692.58 rows=1,250,199 width=11) (actual time=2,545.505..5,159.460 rows=1,252,751 loops=1)

  • Hash Cond: (ek.klasor_id = k.id)
24. 1,077.791 2,866.671 ↓ 1.0 1,252,751 1

Hash Join (cost=47,907.06..118,183.62 rows=1,250,199 width=12) (actual time=961.057..2,866.671 rows=1,252,751 loops=1)

  • Hash Cond: (ek.evrak_id = e_1.id)
25. 834.906 834.906 ↓ 1.0 1,252,751 1

Seq Scan on evrak_klasor ek (cost=0.00..37,384.32 rows=1,250,199 width=12) (actual time=0.021..834.906 rows=1,252,751 loops=1)

  • Filter: aktif
  • Rows Removed by Filter: 82,082
26. 446.780 953.974 ↓ 1.0 896,601 1

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

  • Buckets: 1,048,576 Batches: 2 Memory Usage: 25,265kB
27. 507.194 507.194 ↓ 1.0 896,601 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.095..507.194 rows=896,601 loops=1)

  • Heap Fetches: 21,732
28. 259.975 1,584.047 ↓ 1.0 461,620 1

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

  • Buckets: 524,288 Batches: 1 Memory Usage: 23,998kB
29. 1,324.072 1,324.072 ↓ 1.0 461,620 1

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

30. 0.014 72.132 ↑ 1.0 1 1

Hash (cost=41.24..41.24 rows=1 width=6) (actual time=72.132..72.132 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
31. 72.118 72.118 ↑ 1.0 1 1

Index Scan using evrak_pkey on evrak evrak1_ (cost=0.42..41.24 rows=1 width=6) (actual time=72.116..72.118 rows=1 loops=1)

  • Index Cond: (id = ANY ('{1484084,1151486,1151715,794943,649594}'::numeric[]))
  • Filter: (belge AND (silme_tarih IS NULL) AND (belge_tarih >= '2020-01-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: 4
32. 0.372 0.372 ↓ 0.0 0 4

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.093..0.093 rows=0 loops=4)

  • Index Cond: ((birim_id = tt.islem_yapilan_birim_id) AND (left_value >= 128) AND (right_value <= 129))
  • Heap Fetches: 0
33. 28.334 28.334 ↑ 2.0 10 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=28.330..28.334 rows=10 loops=1)

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

  • Index Cond: (id = evrak1_.id)
  • Heap Fetches: 0
Planning time : 457.475 ms
Execution time : 35,924.055 ms