explain.depesz.com

PostgreSQL's explain analyze made readable

Result: O9L6

Settings
# exclusive inclusive rows x rows loops node
1. 93.801 147.018 ↑ 1.0 299,652 1

Hash Left Join (cost=9.56..7,238.50 rows=299,652 width=148) (actual time=0.026..147.018 rows=299,652 loops=1)

  • Hash Cond: (cur.user_id = prev.user_id)
  • Filter: ((prev.user_id IS NULL) OR (prev.action_id = 3))
2.          

CTE previous_users

3. 0.000 0.008 ↓ 0.0 0 1

Unique (cost=9.51..9.52 rows=1 width=160) (actual time=0.008..0.008 rows=0 loops=1)

4. 0.004 0.008 ↓ 0.0 0 1

Sort (cost=9.51..9.52 rows=2 width=160) (actual time=0.008..0.008 rows=0 loops=1)

  • Sort Key: delta.user_id, delta.id
  • Sort Method: quicksort Memory: 25kB
5. 0.002 0.004 ↓ 0.0 0 1

Bitmap Heap Scan on big_query_delta delta (cost=4.16..9.50 rows=2 width=160) (actual time=0.004..0.004 rows=0 loops=1)

  • Recheck Cond: (source_table_id = 1)
6. 0.002 0.002 ↓ 0.0 0 1

Bitmap Index Scan on big_query_idx1 (cost=0.00..4.16 rows=2 width=0) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: (source_table_id = 1)
7. 53.208 53.208 ↑ 1.0 299,652 1

Seq Scan on _big_query_delta_current_users cur (cost=0.00..6,086.52 rows=299,652 width=148) (actual time=0.011..53.208 rows=299,652 loops=1)

8. 0.000 0.009 ↓ 0.0 0 1

Hash (cost=0.02..0.02 rows=1 width=8) (actual time=0.009..0.009 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 0kB
9. 0.009 0.009 ↓ 0.0 0 1

CTE Scan on previous_users prev (cost=0.00..0.02 rows=1 width=8) (actual time=0.009..0.009 rows=0 loops=1)

Planning time : 0.308 ms
Execution time : 163.370 ms