explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yVMg

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

Limit (cost=40,653.87..40,653.90 rows=10 width=278) (actual time=0.117..0.117 rows=0 loops=1)

  • Output: e.id, e.created, e.ip, e.user_id, (COALESCE(da_u.name, da_u_alt.name)), (COALESCE(da_u.email, da_u_alt.email)), e.agent_id, ag.email, e.admin_id, a.name, a.login, e.pk_id, e.action, e.comment
  • Buffers: shared hit=1 read=3
2. 0.013 0.116 ↓ 0.0 0 1

Sort (cost=40,653.87..40,664.66 rows=4,316 width=278) (actual time=0.116..0.116 rows=0 loops=1)

  • Output: e.id, e.created, e.ip, e.user_id, (COALESCE(da_u.name, da_u_alt.name)), (COALESCE(da_u.email, da_u_alt.email)), e.agent_id, ag.email, e.admin_id, a.name, a.login, e.pk_id, e.action, e.comment
  • Sort Key: e.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1 read=3
3. 0.000 0.103 ↓ 0.0 0 1

Hash Left Join (cost=29,313.69..40,560.61 rows=4,316 width=278) (actual time=0.103..0.103 rows=0 loops=1)

  • Output: e.id, e.created, e.ip, e.user_id, COALESCE(da_u.name, da_u_alt.name), COALESCE(da_u.email, da_u_alt.email), e.agent_id, ag.email, e.admin_id, a.name, a.login, e.pk_id, e.action, e.comment
  • Hash Cond: (e.pk_id = da_u_alt.id)
  • Buffers: shared hit=1 read=3
4. 0.001 0.103 ↓ 0.0 0 1

Hash Left Join (cost=370.82..11,531.82 rows=4,316 width=225) (actual time=0.103..0.103 rows=0 loops=1)

  • Output: e.id, e.created, e.ip, e.user_id, e.agent_id, e.admin_id, e.pk_id, e.action, e.comment, da_u.name, da_u.email, a.name, a.login, ag.email
  • Hash Cond: (e.agent_id = ag.id)
  • Buffers: shared hit=1 read=3
5. 0.000 0.102 ↓ 0.0 0 1

Hash Left Join (cost=10.65..11,150.79 rows=4,316 width=204) (actual time=0.102..0.102 rows=0 loops=1)

  • Output: e.id, e.created, e.ip, e.user_id, e.agent_id, e.admin_id, e.pk_id, e.action, e.comment, da_u.name, da_u.email, a.name, a.login
  • Hash Cond: (e.admin_id = a.id)
  • Buffers: shared hit=1 read=3
6. 0.001 0.102 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.99..11,115.04 rows=4,316 width=179) (actual time=0.102..0.102 rows=0 loops=1)

  • Output: e.id, e.created, e.ip, e.user_id, e.agent_id, e.admin_id, e.pk_id, e.action, e.comment, da_u.name, da_u.email
  • Join Filter: (da_u.id = e.user_id)
  • Buffers: shared hit=1 read=3
7. 0.101 0.101 ↓ 0.0 0 1

Index Scan using ix_event_log_user_action_created on public.event_log e (cost=0.57..11,041.85 rows=4,316 width=126) (actual time=0.101..0.101 rows=0 loops=1)

  • Output: e.id, e.created, e.ip, e.user_id, e.agent_id, e.admin_id, e.pk_id, e.action, e.comment
  • Index Cond: ((e.user_id = 273615) AND ((e.action)::text = 'user_comment_add'::text) AND (e.created >= '2016-07-05 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=1 read=3
8. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.42..8.45 rows=1 width=57) (never executed)

  • Output: da_u.name, da_u.email, da_u.id
9. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_users on da.users da_u (cost=0.42..8.44 rows=1 width=57) (never executed)

  • Output: da_u.name, da_u.email, da_u.id
  • Index Cond: (da_u.id = 273615)
10. 0.000 0.000 ↓ 0.0 0

Hash (cost=7.07..7.07 rows=207 width=29) (never executed)

  • Output: a.name, a.login, a.id
11. 0.000 0.000 ↓ 0.0 0

Seq Scan on da.admins a (cost=0.00..7.07 rows=207 width=29) (never executed)

  • Output: a.name, a.login, a.id
12. 0.000 0.000 ↓ 0.0 0

Hash (cost=347.30..347.30 rows=1,030 width=25) (never executed)

  • Output: ag.email, ag.id
13. 0.000 0.000 ↓ 0.0 0

Seq Scan on da.agents ag (cost=0.00..347.30 rows=1,030 width=25) (never executed)

  • Output: ag.email, ag.id
14. 0.000 0.000 ↓ 0.0 0

Hash (cost=24,271.83..24,271.83 rows=373,683 width=57) (never executed)

  • Output: da_u_alt.name, da_u_alt.email, da_u_alt.id
15. 0.000 0.000 ↓ 0.0 0

Seq Scan on da.users da_u_alt (cost=0.00..24,271.83 rows=373,683 width=57) (never executed)

  • Output: da_u_alt.name, da_u_alt.email, da_u_alt.id
Planning time : 0.998 ms
Execution time : 0.242 ms