explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ix1z

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.025 ↓ 0.0 0 1

Nested Loop (cost=8.63..9,674.59 rows=1 width=2,497) (actual time=0.025..0.025 rows=0 loops=1)

2. 0.002 0.023 ↓ 0.0 0 1

Nested Loop Left Join (cost=7.13..9,249.98 rows=1 width=2,529) (actual time=0.023..0.023 rows=0 loops=1)

  • Join Filter: (listing_attribute_value.listing_id = listing.id)
3. 0.000 0.021 ↓ 0.0 0 1

Nested Loop Left Join (cost=3.80..21.51 rows=1 width=1,217) (actual time=0.021..0.021 rows=0 loops=1)

  • Join Filter: (listing_promo_homepage.listing_id = listing.id)
4. 0.002 0.021 ↓ 0.0 0 1

Nested Loop Left Join (cost=3.38..18.19 rows=1 width=1,213) (actual time=0.021..0.021 rows=0 loops=1)

  • Join Filter: (listing_promo.listing_id = listing.id)
5. 0.002 0.019 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.96..14.86 rows=1 width=1,201) (actual time=0.019..0.019 rows=0 loops=1)

6. 0.000 0.017 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.54..14.41 rows=1 width=1,197) (actual time=0.017..0.017 rows=0 loops=1)

7. 0.002 0.017 ↓ 0.0 0 1

Nested Loop (cost=2.11..11.76 rows=1 width=1,176) (actual time=0.017..0.017 rows=0 loops=1)

8. 0.001 0.015 ↓ 0.0 0 1

Nested Loop (cost=1.69..9.10 rows=1 width=1,109) (actual time=0.015..0.015 rows=0 loops=1)

9. 0.001 0.014 ↓ 0.0 0 1

Nested Loop (cost=1.27..7.41 rows=1 width=1,067) (actual time=0.014..0.014 rows=0 loops=1)

10. 0.002 0.013 ↓ 0.0 0 1

Nested Loop (cost=0.85..6.39 rows=1 width=1,021) (actual time=0.013..0.013 rows=0 loops=1)

11. 0.000 0.011 ↓ 0.0 0 1

Nested Loop (cost=0.43..3.74 rows=1 width=971) (actual time=0.011..0.011 rows=0 loops=1)

  • Join Filter: (listing.category_id = category.id)
12. 0.011 0.011 ↓ 0.0 0 1

Index Scan using listing_pkey on listing (cost=0.43..2.65 rows=1 width=874) (actual time=0.011..0.011 rows=0 loops=1)

  • Index Cond: (id = 8,654,390)
  • Filter: (state = 'published'::listing.listing_state)
13. 0.000 0.000 ↓ 0.0 0

Seq Scan on category (cost=0.00..1.04 rows=4 width=99) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Index Scan using ix_type_id_official_location on official_location town (cost=0.42..2.64 rows=1 width=50) (never executed)

  • Index Cond: ((id = listing.official_location_id) AND ((type)::text = 'town'::text))
15. 0.000 0.000 ↓ 0.0 0

Index Scan using official_location_pkey on official_location district (cost=0.42..1.01 rows=1 width=50) (never executed)

  • Index Cond: (id = town.parent_id)
  • Filter: ((type)::text = 'district'::text)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using official_location_pkey on official_location city (cost=0.42..1.68 rows=1 width=46) (never executed)

  • Index Cond: (id = district.parent_id)
  • Filter: ((type)::text = 'city'::text)
17. 0.000 0.000 ↓ 0.0 0

Index Scan using account_pkey on account (cost=0.42..2.65 rows=1 width=71) (never executed)

  • Index Cond: (id = listing.account_id)
  • Filter: ((state = 'free_of_charge'::account.account_state) OR (state = 'paid'::account.account_state))
18. 0.000 0.000 ↓ 0.0 0

Index Scan using member_pkey on member (cost=0.42..2.64 rows=1 width=21) (never executed)

  • Index Cond: (id = listing.member_id)
19. 0.000 0.000 ↓ 0.0 0

Index Only Scan using office_pkey on office (cost=0.42..0.44 rows=1 width=4) (never executed)

  • Index Cond: (id = member.office_id)
  • Heap Fetches: 0
20. 0.000 0.000 ↓ 0.0 0

Index Scan using listing_promo_fki on listing_promo (cost=0.42..3.31 rows=1 width=16) (never executed)

  • Index Cond: (listing_id = 8,654,390)
  • Filter: ((NOT disabled) AND (promo_type = 3) AND (upper(period) > now()))
21. 0.000 0.000 ↓ 0.0 0

Index Scan using listing_promo_fki on listing_promo listing_promo_homepage (cost=0.42..3.31 rows=1 width=8) (never executed)

  • Index Cond: (listing_id = 8,654,390)
  • Filter: ((NOT disabled) AND (promo_type = 1) AND (upper(period) > now()))
22. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=3.33..9,228.44 rows=1 width=125) (never executed)

  • Group Key: listing_attribute_value.listing_id
23. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=3.33..2,190.49 rows=546 width=125) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Index Only Scan using listing_attribute_value_pkey on listing_attribute_value (cost=0.57..71.27 rows=546 width=6) (never executed)

  • Index Cond: (listing_id = 8,654,390)
  • Heap Fetches: 0
25. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on attribute_lookup (cost=2.76..3.87 rows=1 width=123) (never executed)

  • Recheck Cond: (id = listing_attribute_value.lookup_id)
26. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on attribute_lookup_pkey (cost=0.00..2.76 rows=1 width=0) (never executed)

  • Index Cond: (id = listing_attribute_value.lookup_id)
27. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1.50..1.51 rows=1 width=32) (never executed)

28. 0.000 0.000 ↓ 0.0 0

Function Scan on unnest name (cost=0.00..1.00 rows=100 width=32) (never executed)

29.          

SubPlan (for Nested Loop)

30. 0.000 0.000 ↓ 0.0 0

Result (cost=420.86..420.87 rows=1 width=0) (never executed)

31.          

Initplan (for Result)

32. 0.000 0.000 ↓ 0.0 0

Sort (cost=419.92..420.86 rows=375 width=76) (never executed)

  • Sort Key: li.sort_order
33. 0.000 0.000 ↓ 0.0 0

Index Scan using listing_image_fki on listing_image li (cost=0.56..403.89 rows=375 width=76) (never executed)

  • Index Cond: (listing_id = listing.id)