explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wxlw

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 0.332 ↑ 1.0 1 1

Limit (cost=3.65..6.39 rows=1 width=972) (actual time=0.330..0.332 rows=1 loops=1)

2. 0.019 0.328 ↑ 165,666.0 1 1

Nested Loop Left Join (cost=3.65..454,731.09 rows=165,666 width=972) (actual time=0.325..0.328 rows=1 loops=1)

3. 0.003 0.273 ↑ 55,222.0 1 1

Nested Loop Left Join (cost=0.73..281,472.07 rows=55,222 width=1,054) (actual time=0.273..0.273 rows=1 loops=1)

4. 0.004 0.052 ↑ 55,222.0 1 1

Nested Loop (cost=0.29..22,871.33 rows=55,222 width=516) (actual time=0.051..0.052 rows=1 loops=1)

5. 0.018 0.018 ↑ 55,222.0 1 1

Seq Scan on companies (cost=0.00..3,598.22 rows=55,222 width=191) (actual time=0.017..0.018 rows=1 loops=1)

6. 0.030 0.030 ↑ 1.0 1 1

Index Scan using companies_data_company_id_idx1 on companies_data (cost=0.29..0.35 rows=1 width=329) (actual time=0.029..0.030 rows=1 loops=1)

  • Index Cond: (company_id = companies.company_id)
7. 0.002 0.218 ↓ 0.0 0 1

Limit (cost=0.44..4.66 rows=1 width=538) (actual time=0.217..0.218 rows=0 loops=1)

8. 0.110 0.216 ↓ 0.0 0 1

Nested Loop (cost=0.44..13.11 rows=3 width=538) (actual time=0.215..0.216 rows=0 loops=1)

  • Join Filter: (comp_address.countryid = utl_countries.countryid)
9. 0.062 0.062 ↑ 1.0 44 1

Seq Scan on utl_countries (cost=0.00..1.44 rows=44 width=520) (actual time=0.014..0.062 rows=44 loops=1)

10. 0.036 0.044 ↓ 0.0 0 44

Materialize (cost=0.44..9.70 rows=3 width=26) (actual time=0.001..0.001 rows=0 loops=44)

11. 0.003 0.008 ↓ 0.0 0 1

Nested Loop (cost=0.44..9.69 rows=3 width=26) (actual time=0.007..0.008 rows=0 loops=1)

12. 0.005 0.005 ↓ 0.0 0 1

Index Scan using comp_address_compid_iswithdrawn_idx on comp_address (cost=0.29..3.68 rows=3 width=8) (actual time=0.004..0.005 rows=0 loops=1)

  • Index Cond: ((compid = companies.company_id) AND (iswithdrawn = false))
  • Filter: (NOT iswithdrawn)
13. 0.000 0.000 ↓ 0.0 0

Index Scan using utl_cities_pkey on utl_cities (cost=0.15..2.00 rows=1 width=26) (never executed)

  • Index Cond: (cityid = comp_address.cityid)
14. 0.004 0.036 ↓ 0.0 0 1

HashAggregate (cost=2.92..2.98 rows=3 width=44) (actual time=0.034..0.036 rows=0 loops=1)

  • Group Key: sum((count(*))) OVER (?)
15. 0.003 0.032 ↓ 0.0 0 1

WindowAgg (cost=2.74..2.81 rows=3 width=44) (actual time=0.031..0.032 rows=0 loops=1)

16. 0.002 0.029 ↓ 0.0 0 1

HashAggregate (cost=2.74..2.77 rows=3 width=12) (actual time=0.029..0.029 rows=0 loops=1)

  • Group Key: ratings2.value
17. 0.004 0.027 ↓ 0.0 0 1

Nested Loop (cost=0.41..2.70 rows=5 width=4) (actual time=0.026..0.027 rows=0 loops=1)

18. 0.017 0.017 ↑ 1.0 1 1

Seq Scan on rating_statuss (cost=0.00..1.04 rows=1 width=4) (actual time=0.015..0.017 rows=1 loops=1)

  • Filter: ((rating_status_constant)::text = 'RATE_MARK_SET'::text)
  • Rows Removed by Filter: 2
19. 0.006 0.006 ↓ 0.0 0 1

Index Only Scan using ix_ratings2 on ratings2 (cost=0.41..1.62 rows=5 width=8) (actual time=0.005..0.006 rows=0 loops=1)

  • Index Cond: ((objectcompid = companies.company_id) AND (ratingstatuslid = rating_statuss.rating_status_id))
  • Heap Fetches: 0
Planning time : 1.298 ms
Execution time : 0.449 ms