explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Gx9q

Settings
# exclusive inclusive rows x rows loops node
1. 0.169 8.905 ↓ 51.0 51 1

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

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

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

3. 0.037 8.541 ↓ 52.0 104 1

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

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

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

5. 0.033 8.071 ↓ 56.0 56 1

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

6. 0.032 7.926 ↓ 56.0 56 1

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

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

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

8. 0.045 7.498 ↑ 1.8 54 1

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

9. 0.076 7.345 ↑ 1.8 54 1

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

10. 0.048 7.107 ↑ 1.8 54 1

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

11. 0.065 6.897 ↑ 1.8 54 1

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

12. 0.000 6.670 ↑ 1.8 54 1

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

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

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

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

Seq Scan on user_unit_transitions (cost=0.00..16.37 rows=615 width=29) (actual time=0.014..0.215 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.818 4.456 ↑ 1.0 15,627 1

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

  • Buckets: 16,384 Batches: 1 Memory Usage: 1,594kB
16. 1.638 1.638 ↑ 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.638 rows=15,627 loops=1)

17. 1.893 1.893 ↓ 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.003..0.003 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.108 0.108 ↑ 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.002..0.002 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