explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VqZp

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 0.139 ↓ 0.0 0 1

Limit (cost=26,153.69..26,153.71 rows=10 width=278) (actual time=0.139..0.139 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=7
2. 0.042 0.136 ↓ 0.0 0 1

Sort (cost=26,153.69..26,154.39 rows=281 width=278) (actual time=0.136..0.136 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=7
3. 0.000 0.094 ↓ 0.0 0 1

Nested Loop Left Join (cost=371.25..26,147.62 rows=281 width=278) (actual time=0.094..0.094 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
  • Join Filter: (da_u_alt.id = e.pk_id)
  • Buffers: shared hit=4
4. 0.001 0.094 ↓ 0.0 0 1

Hash Left Join (cost=370.82..26,134.96 rows=281 width=225) (actual time=0.094..0.094 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=4
5. 0.001 0.093 ↓ 0.0 0 1

Hash Left Join (cost=10.65..25,773.43 rows=281 width=204) (actual time=0.093..0.093 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=4
6. 0.001 0.092 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.99..25,762.07 rows=281 width=179) (actual time=0.092..0.092 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
  • Buffers: shared hit=4
7. 0.091 0.091 ↓ 0.0 0 1

Index Scan using ix_event_log_pk_action on public.event_log e (cost=0.57..23,451.62 rows=281 width=126) (actual time=0.091..0.091 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.pk_id = 273615) AND ((e.action)::text = 'user_comment_add'::text))
  • Filter: ((e.user_id IS NULL) AND (e.created >= '2016-07-05 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=4
8. 0.000 0.000 ↓ 0.0 0

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

  • Output: da_u.name, da_u.email, da_u.id
  • Index Cond: (da_u.id = e.user_id)
9. 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
10. 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
11. 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
12. 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
13. 0.000 0.000 ↓ 0.0 0

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

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

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

  • Output: da_u_alt.name, da_u_alt.email, da_u_alt.id
  • Index Cond: (da_u_alt.id = 273615)
Planning time : 4.109 ms
Execution time : 0.312 ms