explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fCMY

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 3.225 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.15..617.57 rows=3 width=668) (actual time=3.225..3.225 rows=0 loops=1)

2. 0.001 3.224 ↓ 0.0 0 1

Nested Loop (cost=0.86..616.43 rows=3 width=620) (actual time=3.224..3.224 rows=0 loops=1)

3. 0.006 3.223 ↓ 0.0 0 1

Nested Loop (cost=0.57..594.08 rows=3 width=359) (actual time=3.223..3.223 rows=0 loops=1)

  • Join Filter: (notification.to_user_id = to_user.id)
4. 0.023 2.379 ↑ 41.5 2 1

Nested Loop (cost=0.29..541.44 rows=83 width=98) (actual time=0.817..2.379 rows=2 loops=1)

5. 0.850 0.850 ↑ 14.0 6 1

Seq Scan on account_notification notification (cost=0.00..11.82 rows=84 width=50) (actual time=0.395..0.850 rows=6 loops=1)

  • Filter: ((NOT emailed) AND (NOT read) AND (NOT deleted))
  • Rows Removed by Filter: 476
6. 1.506 1.506 ↓ 0.0 0 6

Index Scan using social_profile_pkey on social_profile to_user__social_profile (cost=0.29..6.30 rows=1 width=48) (actual time=0.251..0.251 rows=0 loops=6)

  • Index Cond: (user_id = notification.to_user_id)
  • Filter: chat_notification
  • Rows Removed by Filter: 1
7. 0.838 0.838 ↓ 0.0 0 2

Index Scan using account_user_pkey on account_user to_user (cost=0.29..0.62 rows=1 width=261) (actual time=0.419..0.419 rows=0 loops=2)

  • Index Cond: (id = to_user__social_profile.user_id)
  • Filter: (is_eligible AND is_active AND (gcm_devices_count > 0))
  • Rows Removed by Filter: 1
8. 0.000 0.000 ↓ 0.0 0

Index Scan using account_user_pkey on account_user from_user (cost=0.29..7.45 rows=1 width=261) (never executed)

  • Index Cond: (id = notification.from_user_id)
  • Filter: (is_eligible AND is_active)
9. 0.000 0.000 ↓ 0.0 0

Index Scan using social_profile_pkey on social_profile from_user__social_profile (cost=0.29..0.38 rows=1 width=48) (never executed)

  • Index Cond: (user_id = from_user.id)
Planning time : 20.972 ms
Execution time : 3.966 ms