explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pIq9

Settings
# exclusive inclusive rows x rows loops node
1. 0.667 31.625 ↓ 1.5 573 1

Nested Loop (cost=2,530.91..5,123.09 rows=383 width=1,736) (actual time=28.972..31.625 rows=573 loops=1)

2. 12.527 29.026 ↓ 1.2 644 1

HashAggregate (cost=2,530.63..2,535.83 rows=520 width=16) (actual time=28.936..29.026 rows=644 loops=1)

  • Group Key: a.notify_user_id
3. 16.499 16.499 ↓ 1.0 61,175 1

Seq Scan on activities a (cost=0.00..2,384.19 rows=58,575 width=16) (actual time=0.007..16.499 rows=61,175 loops=1)

  • Filter: (seen_at IS NULL)
  • Rows Removed by Filter: 1,138
4. 1.932 1.932 ↑ 1.0 1 644

Index Scan using users_pkey on users u0 (cost=0.29..5.08 rows=1 width=1,736) (actual time=0.003..0.003 rows=1 loops=644)

  • Index Cond: (id = a.notify_user_id)
  • Filter: ((email_confirm_by IS NULL) AND (deleted_at IS NULL) AND (next_digest_date <= now()))
  • Rows Removed by Filter: 0
Planning time : 0.447 ms
Execution time : 31.707 ms