explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3aVF

Settings
# exclusive inclusive rows x rows loops node
1. 132.917 34,377.559 ↓ 1.0 40,456 1

Nested Loop (cost=5,582.22..10,833.66 rows=40,125 width=1,767) (actual time=107.755..34,377.559 rows=40,456 loops=1)

2. 72.025 544.794 ↓ 1.0 40,456 1

Hash Join (cost=5,581.97..10,030.91 rows=40,125 width=8) (actual time=93.489..544.794 rows=40,456 loops=1)

  • Hash Cond: (aret.adr_rf = ar.id)
3. 77.015 460.025 ↓ 1.0 40,456 1

Hash Join (cost=4,900.76..9,244.35 rows=40,125 width=12) (actual time=80.678..460.025 rows=40,456 loops=1)

  • Hash Cond: (sv_adres_ul.adres_rf = aret.id)
4. 71.234 332.316 ↓ 1.0 40,456 1

Hash Join (cost=3,059.24..7,297.49 rows=40,125 width=12) (actual time=29.674..332.316 rows=40,456 loops=1)

  • Hash Cond: (sv_ul.sv_naim_ul = ill.id)
5. 109.614 247.556 ↓ 1.0 40,456 1

Hash Join (cost=1,493.80..5,626.71 rows=40,125 width=16) (actual time=15.904..247.556 rows=40,456 loops=1)

  • Hash Cond: (sv_ul.sv_adres_ul = sv_adres_ul.id)
6. 122.307 122.307 ↓ 1.0 40,456 1

Seq Scan on sv_ul (cost=0.00..4,027.57 rows=40,125 width=16) (actual time=0.011..122.307 rows=40,456 loops=1)

  • Filter: (ogrn <> '1145476061862'::bigint)
  • Rows Removed by Filter: 1
7. 7.993 15.635 ↑ 1.0 40,480 1

Hash (cost=987.80..987.80 rows=40,480 width=8) (actual time=15.634..15.635 rows=40,480 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2094kB
8. 7.642 7.642 ↑ 1.0 40,480 1

Seq Scan on sv_adres_ul (cost=0.00..987.80 rows=40,480 width=8) (actual time=0.006..7.642 rows=40,480 loops=1)

9. 7.642 13.526 ↑ 1.0 40,478 1

Hash (cost=1,059.46..1,059.46 rows=40,478 width=4) (actual time=13.526..13.526 rows=40,478 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 1936kB
10. 5.884 5.884 ↑ 1.0 40,478 1

Index Only Scan using sv_naim_ul_pkey on sv_naim_ul ill (cost=0.29..1,059.46 rows=40,478 width=4) (actual time=0.043..5.884 rows=40,478 loops=1)

  • Heap Fetches: 0
11. 25.894 50.694 ↑ 1.0 41,090 1

Hash (cost=1,327.90..1,327.90 rows=41,090 width=8) (actual time=50.694..50.694 rows=41,090 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2118kB
12. 24.800 24.800 ↑ 1.0 41,090 1

Seq Scan on adr_rf_egrul_tip aret (cost=0.00..1,327.90 rows=41,090 width=8) (actual time=0.013..24.800 rows=41,090 loops=1)

13. 6.402 12.744 ↑ 1.0 17,488 1

Hash (cost=462.61..462.61 rows=17,488 width=4) (actual time=12.744..12.744 rows=17,488 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 871kB
14. 6.342 6.342 ↑ 1.0 17,488 1

Index Only Scan using adr_rf_pkey on adr_rf ar (cost=0.29..462.61 rows=17,488 width=4) (actual time=2.016..6.342 rows=17,488 loops=1)

  • Heap Fetches: 0
15. 33,699.848 33,699.848 ↑ 1.0 1 40,456

Function Scan on get_company_info company_info (cost=0.25..0.26 rows=1 width=1,767) (actual time=0.832..0.833 rows=1 loops=40,456)

Planning time : 1.233 ms
Execution time : 34,396.499 ms