explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2af0

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.022 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,294.92..1,298.95 rows=1 width=446) (actual time=0.022..0.022 rows=0 loops=1)

2. 0.000 0.022 ↓ 0.0 0 1

Limit (cost=1,294.83..1,294.85 rows=1 width=321) (actual time=0.022..0.022 rows=0 loops=1)

3. 0.001 0.022 ↓ 0.0 0 1

Result (cost=1,294.83..1,294.85 rows=1 width=321) (actual time=0.022..0.022 rows=0 loops=1)

4. 0.006 0.021 ↓ 0.0 0 1

Sort (cost=1,294.83..1,294.83 rows=1 width=364) (actual time=0.021..0.021 rows=0 loops=1)

  • Sort Key: "user".latest_activity_at DESC
  • Sort Method: quicksort Memory: 25kB
5. 0.015 0.015 ↓ 0.0 0 1

Index Scan using users_pkey on users "user" (cost=1,287.84..1,294.83 rows=1 width=364) (actual time=0.015..0.015 rows=0 loops=1)

  • Index Cond: (id = ANY ('{2,0}'::integer[]))
  • Filter: ((postgis_location_point IS NOT NULL) AND (NOT (hashed SubPlan 1)) AND (overall_score >= '0.100000000000000006'::double precision) AND (scoreboard_swipes >= 5) AND (age >= 18) AND (age <= 45) AND (settings_age_range_from <= 23) AND (settings_age_range_to >= 23) AND ((profile_pic)::text ~~ 'https://crush-app-%'::text) AND (timezone = 1) AND ((settings_search_for)::text = 'male'::text) AND ((gender)::text = 'female'::text) AND (_st_distance(geography((postgis_location_point)::geometry), '0101000020E610000009F9A067B3AA1C403333333333B34940'::geography, '0'::double precision, false) <= '200000'::double precision))
6.          

SubPlan (for Index Scan)

7. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=1,285.50..1,287.43 rows=644 width=516) (never executed)

  • Group Key: l.sender_id
8. 0.000 0.000 ↓ 0.0 0

Append (cost=4.51..1,285.18 rows=644 width=516) (never executed)

9. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on likes l (cost=4.51..508.81 rows=255 width=16) (never executed)

  • Recheck Cond: (user_id = 1)
10. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on likes_user_id (cost=0.00..4.50 rows=255 width=0) (never executed)

  • Index Cond: (user_id = 1)
11. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on dislikes d (cost=4.72..774.44 rows=389 width=16) (never executed)

  • Recheck Cond: (user_id = 1)
12. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on dislikes_user_id (cost=0.00..4.70 rows=389 width=0) (never executed)

  • Index Cond: (user_id = 1)
13. 0.000 0.000 ↓ 0.0 0

Index Scan using pictures_user_id on pictures (cost=0.09..4.09 rows=1 width=125) (never executed)

  • Index Cond: ("user".id = user_id)
Planning time : 1.265 ms
Execution time : 0.174 ms