explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UKdY

Settings
# exclusive inclusive rows x rows loops node
1. 0.061 10.569 ↑ 47.9 8 1

Nested Loop (cost=2,389.58..4,946.20 rows=383 width=1,736) (actual time=10.292..10.569 rows=8 loops=1)

2. 0.295 10.271 ↑ 6.5 79 1

HashAggregate (cost=2,389.29..2,394.39 rows=510 width=16) (actual time=10.256..10.271 rows=79 loops=1)

  • Group Key: a.notify_user_id
3. 9.976 9.976 ↑ 1.1 1,817 1

Seq Scan on activities a (cost=0.00..2,384.19 rows=2,040 width=16) (actual time=0.181..9.976 rows=1,817 loops=1)

  • Filter: ((seen_at IS NULL) AND (sent_at IS NULL))
  • Rows Removed by Filter: 60,496
4. 0.237 0.237 ↓ 0.0 0 79

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

  • 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: 1
Planning time : 0.511 ms
Execution time : 10.619 ms