explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Gphc

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 9.105 ↓ 25.0 25 1

Limit (cost=475.58..475.58 rows=1 width=1,831) (actual time=9.102..9.105 rows=25 loops=1)

2. 0.161 9.101 ↓ 25.0 25 1

Sort (cost=475.58..475.58 rows=1 width=1,831) (actual time=9.100..9.101 rows=25 loops=1)

  • Sort Key: user_units.move_date
  • Sort Method: top-N heapsort Memory: 119kB
3. 0.089 8.940 ↓ 51.0 51 1

Nested Loop (cost=280.19..475.57 rows=1 width=1,831) (actual time=4.881..8.940 rows=51 loops=1)

4. 0.034 8.747 ↓ 52.0 104 1

Nested Loop (cost=280.16..475.50 rows=2 width=1,847) (actual time=4.864..8.747 rows=104 loops=1)

  • Join Filter: (places.id = area_places.place_id)
5. 0.035 8.489 ↓ 56.0 56 1

Nested Loop (cost=280.10..475.38 rows=1 width=1,847) (actual time=4.850..8.489 rows=56 loops=1)

6. 0.029 8.286 ↓ 56.0 56 1

Nested Loop (cost=280.05..473.03 rows=1 width=613) (actual time=4.838..8.286 rows=56 loops=1)

7. 0.063 8.145 ↓ 56.0 56 1

Nested Loop (cost=279.99..472.89 rows=1 width=629) (actual time=4.825..8.145 rows=56 loops=1)

  • Join Filter: (user_unit_transitions.user_unit_id = user_unit_photos.user_unit_id)
8. 0.024 7.812 ↑ 1.9 54 1

Nested Loop (cost=279.93..463.54 rows=100 width=629) (actual time=4.808..7.812 rows=54 loops=1)

9. 0.027 7.680 ↑ 1.9 54 1

Nested Loop (cost=279.88..454.29 rows=100 width=629) (actual time=4.796..7.680 rows=54 loops=1)

10. 0.071 7.545 ↑ 1.9 54 1

Nested Loop (cost=279.82..443.86 rows=100 width=629) (actual time=4.788..7.545 rows=54 loops=1)

11. 0.047 7.312 ↑ 1.9 54 1

Nested Loop (cost=279.76..428.97 rows=100 width=273) (actual time=4.776..7.312 rows=54 loops=1)

12. 0.069 7.103 ↑ 1.9 54 1

Nested Loop (cost=279.70..419.72 rows=100 width=273) (actual time=4.763..7.103 rows=54 loops=1)

13. 0.469 6.872 ↑ 1.9 54 1

Nested Loop (cost=279.65..385.93 rows=100 width=230) (actual time=4.749..6.872 rows=54 loops=1)

  • Join Filter: (user_unit_transitions.user_unit_id = user_units.id)
14. 0.254 5.141 ↑ 1.0 631 1

Hash Join (cost=279.59..298.77 rows=635 width=89) (actual time=4.709..5.141 rows=631 loops=1)

  • Hash Cond: (user_unit_transitions.user_unit_id = unit_ratings.user_unit_id)
15. 0.224 0.224 ↑ 1.0 629 1

Seq Scan on user_unit_transitions (cost=0.00..16.48 rows=635 width=29) (actual time=0.019..0.224 rows=629 loops=1)

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

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

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

18. 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
19. 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)
20. 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)
21. 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)
22. 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)
23. 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)
24. 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
25. 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
26. 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)
27. 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)
28. 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