explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gHcW

Settings
# exclusive inclusive rows x rows loops node
1. 0.184 8.831 ↓ 51.0 51 1

Sort (cost=470.03..470.03 rows=1 width=1,831) (actual time=8.827..8.831 rows=51 loops=1)

  • Sort Key: user_units.move_date
  • Sort Method: quicksort Memory: 127kB
2. 0.088 8.647 ↓ 51.0 51 1

Nested Loop (cost=280.19..470.03 rows=1 width=1,831) (actual time=4.585..8.647 rows=51 loops=1)

3. 0.036 8.455 ↓ 52.0 104 1

Nested Loop (cost=280.16..469.96 rows=2 width=1,847) (actual time=4.570..8.455 rows=104 loops=1)

  • Join Filter: (places.id = area_places.place_id)
4. 0.041 8.195 ↓ 56.0 56 1

Nested Loop (cost=280.10..469.83 rows=1 width=1,847) (actual time=4.558..8.195 rows=56 loops=1)

5. 0.030 7.986 ↓ 56.0 56 1

Nested Loop (cost=280.05..467.49 rows=1 width=613) (actual time=4.546..7.986 rows=56 loops=1)

6. 0.035 7.844 ↓ 56.0 56 1

Nested Loop (cost=279.99..467.34 rows=1 width=629) (actual time=4.532..7.844 rows=56 loops=1)

  • Join Filter: (user_unit_transitions.user_unit_id = user_unit_photos.user_unit_id)
7. 0.069 7.539 ↑ 1.8 54 1

Nested Loop (cost=279.93..458.28 rows=97 width=629) (actual time=4.515..7.539 rows=54 loops=1)

8. 0.025 7.416 ↑ 1.8 54 1

Nested Loop (cost=279.88..449.30 rows=97 width=629) (actual time=4.507..7.416 rows=54 loops=1)

9. 0.072 7.283 ↑ 1.8 54 1

Nested Loop (cost=279.82..439.18 rows=97 width=629) (actual time=4.499..7.283 rows=54 loops=1)

10. 0.045 7.049 ↑ 1.8 54 1

Nested Loop (cost=279.76..424.74 rows=97 width=273) (actual time=4.488..7.049 rows=54 loops=1)

11. 0.072 6.842 ↑ 1.8 54 1

Nested Loop (cost=279.70..415.77 rows=97 width=273) (actual time=4.477..6.842 rows=54 loops=1)

12. 0.469 6.608 ↑ 1.8 54 1

Nested Loop (cost=279.65..382.99 rows=97 width=230) (actual time=4.460..6.608 rows=54 loops=1)

  • Join Filter: (user_unit_transitions.user_unit_id = user_units.id)
13. 0.273 4.877 ↓ 1.0 631 1

Hash Join (cost=279.59..298.57 rows=615 width=89) (actual time=4.425..4.877 rows=631 loops=1)

  • Hash Cond: (user_unit_transitions.user_unit_id = unit_ratings.user_unit_id)
14. 0.220 0.220 ↓ 1.0 629 1

Seq Scan on user_unit_transitions (cost=0.00..16.37 rows=615 width=29) (actual time=0.014..0.220 rows=629 loops=1)

  • Filter: (most_recent AND ((to_state)::text = ANY ('{pocketlisting,given_notice,on_market}'::text[])))
  • Rows Removed by Filter: 270
15. 2.764 4.384 ↑ 1.0 15,627 1

Hash (cost=224.89..224.89 rows=15,629 width=60) (actual time=4.383..4.384 rows=15,627 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 1,594kB
16. 1.620 1.620 ↑ 1.0 15,627 1

Seq Scan on unit_ratings (cost=0.00..224.89 rows=15,629 width=60) (actual time=0.006..1.620 rows=15,627 loops=1)

17. 1.262 1.262 ↓ 0.0 0 631

Index Scan using user_units_pkey on user_units (cost=0.06..0.13 rows=1 width=141) (actual time=0.002..0.002 rows=0 loops=631)

  • Index Cond: (id = unit_ratings.user_unit_id)
  • Filter: ((removed_from_feed_at IS NULL) AND (move_date >= '2020-06-06'::date) AND ((user_id <> '00016bc7-dad1-45ad-8661-2cda4728a896'::uuid) OR (property_manager_id IS NOT NULL)) AND (price < 110000))
  • Rows Removed by Filter: 1
18. 0.162 0.162 ↑ 1.0 1 54

Index Scan using units_pkey on units (cost=0.06..0.34 rows=1 width=43) (actual time=0.003..0.003 rows=1 loops=54)

  • Index Cond: (id = user_units.unit_id)
  • Filter: (bedrooms >= 0)
19. 0.162 0.162 ↑ 1.0 1 54

Index Scan using property_places_pkey on property_places (cost=0.06..0.09 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=54)

  • Index Cond: (id = units.property_place_id)
20. 0.162 0.162 ↑ 1.0 1 54

Index Scan using places_pkey on places (cost=0.06..0.15 rows=1 width=356) (actual time=0.003..0.003 rows=1 loops=54)

  • Index Cond: (id = property_places.place_id)
21. 0.108 0.108 ↑ 1.0 1 54

Index Scan using units_pkey on units units_user_units_join (cost=0.06..0.10 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=54)

  • Index Cond: (id = units.id)
22. 0.054 0.054 ↑ 1.0 1 54

Index Scan using property_places_pkey on property_places property_places_user_units_join (cost=0.06..0.09 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=54)

  • Index Cond: (id = units_user_units_join.property_place_id)
23. 0.270 0.270 ↑ 1.0 1 54

Index Scan using index_user_unit_photos_on_user_unit_id on user_unit_photos (cost=0.06..0.09 rows=1 width=32) (actual time=0.004..0.005 rows=1 loops=54)

  • Index Cond: (user_unit_id = unit_ratings.user_unit_id)
  • Filter: (primary_photo AND (deleted_at IS NULL) AND primary_photo AND (deleted_at IS NULL))
  • Rows Removed by Filter: 7
24. 0.112 0.112 ↑ 1.0 1 56

Index Only Scan using places_pkey on places places_user_units (cost=0.06..0.15 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=56)

  • Index Cond: (id = property_places_user_units_join.place_id)
  • Heap Fetches: 56
25. 0.168 0.168 ↑ 1.0 1 56

Index Scan using photos_pkey on photos (cost=0.06..2.35 rows=1 width=1,250) (actual time=0.003..0.003 rows=1 loops=56)

  • Index Cond: (id = user_unit_photos.photo_id)
26. 0.224 0.224 ↑ 1.0 2 56

Index Scan using index_area_places_on_place_id on area_places (cost=0.06..0.11 rows=2 width=32) (actual time=0.003..0.004 rows=2 loops=56)

  • Index Cond: (place_id = property_places.place_id)
27. 0.104 0.104 ↓ 0.0 0 104

Index Scan using areas_pkey on areas (cost=0.03..0.03 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=104)

  • Index Cond: (id = area_places.area_id)
  • Filter: ((slug)::text = 'los-angeles-ca'::text)
  • Rows Removed by Filter: 1