explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3Mg9

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 762.283 ↑ 1.0 4 1

Gather Merge (cost=146834.60..146835.54 rows=8 width=12) (actual time=762.272..774.632 rows=12 loops=1)Finalize GroupAggregate (cost=146,834.60..146,835.62 rows=4 width=12) (actual time=762.279..762.283 rows=4 loops=1)

  • Output: event_type, count(*)
  • Group Key: us.event_type
  • Functions: 21
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 3.503 ms, Inlining 0.000 ms, Optimization 1.755 ms, Emission 22.452 ms, Total 27.710 ms
2. 84.680 774.632 ↓ 1.5 12 1

Gather Merge (cost=146,834.60..146,835.54 rows=8 width=12) (actual time=762.272..774.632 rows=12 loops=1)

  • Output: event_type, (PARTIAL count(*))
  • Workers Planned: 2
  • Workers Launched: 2
3. 0.042 689.952 ↑ 1.0 4 3 / 3

Sort (cost=145,834.58..145,834.59 rows=4 width=12) (actual time=689.952..689.952 rows=4 loops=3)

  • Output: event_type, (PARTIAL count(*))
  • Sort Key: us.event_type
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
  • Worker 1: Sort Method: quicksort Memory: 25kB
  • Worker 0: actual time=653.928..653.928 rows=4 loops=1
  • Worker 1: actual time=653.906..653.907 rows=4 loops=1
4. 433.490 689.910 ↑ 1.0 4 3 / 3

Partial HashAggregate (cost=145,834.50..145,834.54 rows=4 width=12) (actual time=689.909..689.910 rows=4 loops=3)

  • Output: event_type, PARTIAL count(*)
  • Group Key: us.event_type
  • Worker 0: actual time=653.858..653.859 rows=4 loops=1
  • Worker 1: actual time=653.858..653.859 rows=4 loops=1
5. 256.420 256.420 ↑ 1.3 3,333,334 3 / 3

Parallel Seq Scan on public.user_events us (cost=0.00..125,001.00 rows=4,166,700 width=4) (actual time=0.021..256.420 rows=3,333,334 loops=3)

  • Output: user_id, moji_id, event_type, event_detail, inserted_at, id
  • Worker 0: actual time=0.022..242.208 rows=3,225,240 loops=1
  • Worker 1: actual time=0.020..243.929 rows=3,176,400 loops=1
Execution time : 775.572 ms