explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UnkZ

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

GroupAggregate (cost=801.19..801.21 rows=1 width=12) (actual rows= loops=)

  • Group Key: events.provider_user_id
2. 0.000 0.000 ↓ 0.0

Sort (cost=801.19..801.19 rows=1 width=8) (actual rows= loops=)

  • Sort Key: events.provider_user_id
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=5.59..801.18 rows=1 width=8) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=5.44..793.83 rows=42 width=8) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=5.02..642.34 rows=3 width=8) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on profiles (cost=4.72..204.28 rows=56 width=4) (actual rows= loops=)

  • Recheck Cond: (agency_id = 74)
7. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_profiles_on_agency_id (cost=0.00..4.71 rows=56 width=0) (actual rows= loops=)

  • Index Cond: (agency_id = 74)
8. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users (cost=0.29..7.81 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = profiles.user_id)
  • Filter: ((account_type)::text = 'provider'::text)
9. 0.000 0.000 ↓ 0.0

Index Scan using index_events_on_provider_user_id on events (cost=0.42..45.47 rows=503 width=8) (actual rows= loops=)

  • Index Cond: (provider_user_id = users.id)
10. 0.000 0.000 ↓ 0.0

Index Scan using index_providers_event_to_event_travels_on_from_event_id on providers_event_to_event_travels (cost=0.15..0.17 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (from_event_id = events.id)