explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CLpg : KORVMACK

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Unique (cost=119,584,041.35..122,792,397.89 rows=8,228,800 width=32) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=119,584,041.35..120,653,493.53 rows=427,780,871 width=32) (actual rows= loops=)

  • Sort Key: ue.user_id, ue.event_id
3. 0.000 0.000 ↓ 0.0

Hash Join (cost=27,123.43..17,316,765.01 rows=427,780,871 width=32) (actual rows= loops=)

  • Hash Cond: (ue.event_id = de.event_id)
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=27,076.08..2,215,537.51 rows=51,539,864 width=24) (actual rows= loops=)

  • Hash Cond: (ue.user_id = u.id)
5. 0.000 0.000 ↓ 0.0

Seq Scan on user_events ue (cost=0.00..973,088.30 rows=51,539,864 width=12) (actual rows= loops=)

  • Filter: (id > 0)
6. 0.000 0.000 ↓ 0.0

Hash (cost=15,045.48..15,045.48 rows=692,048 width=16) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Seq Scan on users u (cost=0.00..15,045.48 rows=692,048 width=16) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash (cost=26.60..26.60 rows=1,660 width=8) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Seq Scan on detected_events de (cost=0.00..26.60 rows=1,660 width=8) (actual rows= loops=)