explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aH7i

Settings
# exclusive inclusive rows x rows loops node
1. 0.104 8.724 ↓ 51.0 51 1

Sort (cost=475.32..475.32 rows=1 width=1,831) (actual time=8.720..8.724 rows=51 loops=1)

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

Nested Loop (cost=280.17..475.32 rows=1 width=1,831) (actual time=4.424..8.620 rows=51 loops=1)

3. 0.032 8.427 ↓ 52.0 104 1

Nested Loop (cost=280.15..475.25 rows=2 width=1,847) (actual time=4.411..8.427 rows=104 loops=1)

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

Nested Loop (cost=280.09..475.12 rows=1 width=1,847) (actual time=4.402..8.171 rows=56 loops=1)

5. 0.024 7.966 ↓ 56.0 56 1

Nested Loop (cost=280.03..472.78 rows=1 width=613) (actual time=4.394..7.966 rows=56 loops=1)

6. 0.030 7.830 ↓ 56.0 56 1

Nested Loop (cost=279.98..472.63 rows=1 width=629) (actual time=4.387..7.830 rows=56 loops=1)

  • Join Filter: (user_unit_transitions.user_unit_id = user_unit_photos.user_unit_id)
7. 0.065 7.530 ↑ 1.9 54 1

Nested Loop (cost=279.92..463.29 rows=100 width=629) (actual time=4.374..7.530 rows=54 loops=1)

8. 0.080 7.411 ↑ 1.9 54 1

Nested Loop (cost=279.86..454.04 rows=100 width=629) (actual time=4.370..7.411 rows=54 loops=1)

9. 0.075 7.277 ↑ 1.9 54 1

Nested Loop (cost=279.80..443.60 rows=100 width=629) (actual time=4.365..7.277 rows=54 loops=1)

10. 0.043 7.040 ↑ 1.9 54 1

Nested Loop (cost=279.75..428.71 rows=100 width=273) (actual time=4.357..7.040 rows=54 loops=1)

11. 0.069 6.835 ↑ 1.9 54 1

Nested Loop (cost=279.69..419.46 rows=100 width=273) (actual time=4.348..6.835 rows=54 loops=1)

12. 0.000 6.604 ↑ 1.9 54 1

Nested Loop (cost=279.63..385.67 rows=100 width=230) (actual time=4.339..6.604 rows=54 loops=1)

  • Join Filter: (user_unit_transitions.user_unit_id = user_units.id)
13. 0.265 4.794 ↑ 1.0 631 1

Hash Join (cost=279.58..298.64 rows=634 width=89) (actual time=4.306..4.794 rows=631 loops=1)

  • Hash Cond: (user_unit_transitions.user_unit_id = unit_ratings.user_unit_id)
14. 0.264 0.264 ↑ 1.0 629 1

Seq Scan on user_unit_transitions (cost=0.00..16.37 rows=634 width=29) (actual time=0.014..0.264 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.916 4.265 ↑ 1.0 15,627 1

Hash (cost=224.88..224.88 rows=15,627 width=60) (actual time=4.264..4.265 rows=15,627 loops=1)

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

Seq Scan on unit_ratings (cost=0.00..224.88 rows=15,627 width=60) (actual time=0.004..1.349 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.054 0.054 ↑ 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.001..0.001 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