explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2mtg : Postgres11-pgbench-Pi3B-Reporting1

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 510.647 ↑ 9.0 20 1

Finalize GroupAggregate (cost=8,178.39..8,228.04 rows=180 width=67) (actual time=509.893..510.647 rows=20 loops=1)

  • Output: r.fk1, l1.data, count(*), avg(r.v1), max(r.v2)
  • Group Key: r.fk1, l1.data
  • Buffers: shared hit=2 read=1637
2. 0.000 513.592 ↑ 6.0 60 1

Gather Merge (cost=8,178.39..8,220.39 rows=360 width=67) (actual time=509.818..513.592 rows=60 loops=1)

  • Output: r.fk1, l1.data, (PARTIAL count(*)), (PARTIAL avg(r.v1)), (PARTIAL max(r.v2))
  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=42 read=4784
3. 0.810 1,470.765 ↑ 9.0 20 3

Sort (cost=7,178.37..7,178.82 rows=180 width=67) (actual time=490.245..490.255 rows=20 loops=3)

  • Output: r.fk1, l1.data, (PARTIAL count(*)), (PARTIAL avg(r.v1)), (PARTIAL max(r.v2))
  • Sort Key: r.fk1, l1.data
  • Sort Method: quicksort Memory: 19kB
  • Worker 0: Sort Method: quicksort Memory: 19kB
  • Worker 1: Sort Method: quicksort Memory: 19kB
  • Buffers: shared hit=42 read=4784
  • Worker 0: actual time=481.887..481.896 rows=20 loops=1
  • Buffers: shared hit=20 read=1574
  • Worker 1: actual time=481.891..481.899 rows=20 loops=1
  • Buffers: shared hit=20 read=1573
4. 538.245 1,469.955 ↑ 9.0 20 3

Partial HashAggregate (cost=7,169.38..7,171.63 rows=180 width=67) (actual time=489.916..489.985 rows=20 loops=3)

  • Output: r.fk1, l1.data, PARTIAL count(*), PARTIAL avg(r.v1), PARTIAL max(r.v2)
  • Group Key: r.fk1, l1.data
  • Buffers: shared hit=12 read=4784
  • Worker 0: actual time=481.501..481.570 rows=20 loops=1
  • Buffers: shared hit=5 read=1574
  • Worker 1: actual time=481.469..481.538 rows=20 loops=1
  • Buffers: shared hit=5 read=1573
5. 310.032 931.710 ↑ 1.2 66,667 3

Hash Join (cost=3.35..6,127.71 rows=83,333 width=33) (actual time=0.789..310.570 rows=66,667 loops=3)

  • Output: r.fk1, l1.data, r.v1, r.v2
  • Inner Unique: true
  • Hash Cond: (r.fk2 = l2.id)
  • Buffers: shared hit=12 read=4784
  • Worker 0: actual time=0.889..305.076 rows=65846 loops=1
  • Buffers: shared hit=5 read=1574
  • Worker 1: actual time=0.865..304.946 rows=65739 loops=1
  • Buffers: shared hit=5 read=1573
6. 413.703 620.880 ↑ 1.2 66,667 3

Hash Join (cost=1.45..5,883.89 rows=83,333 width=41) (actual time=0.315..206.960 rows=66,667 loops=3)

  • Output: r.fk1, r.v1, r.v2, r.fk2, l1.data
  • Inner Unique: true
  • Hash Cond: (r.fk1 = l1.id)
  • Buffers: shared hit=3 read=4784
  • Worker 0: actual time=0.311..202.973 rows=65846 loops=1
  • Buffers: shared hit=1 read=1574
  • Worker 1: actual time=0.317..202.970 rows=65739 loops=1
  • Buffers: shared hit=1 read=1573
7. 206.754 206.754 ↑ 1.2 66,667 3

Parallel Seq Scan on public.pgbench_reporting r (cost=0.00..5,617.33 rows=83,333 width=26) (actual time=0.122..68.918 rows=66,667 loops=3)

  • Output: r.id, r.d1, r.fk1, r.fk2, r.v1, r.v2, r.d2
  • Buffers: shared read=4784
  • Worker 0: actual time=0.121..68.126 rows=65846 loops=1
  • Buffers: shared read=1574
  • Worker 1: actual time=0.110..67.786 rows=65739 loops=1
  • Buffers: shared read=1573
8. 0.207 0.423 ↑ 1.0 20 3

Hash (cost=1.20..1.20 rows=20 width=23) (actual time=0.140..0.141 rows=20 loops=3)

  • Output: l1.data, l1.id
  • Buckets: 1024 Batches: 1 Memory Usage: 5kB
  • Buffers: shared hit=3
  • Worker 0: actual time=0.140..0.141 rows=20 loops=1
  • Buffers: shared hit=1
  • Worker 1: actual time=0.153..0.154 rows=20 loops=1
  • Buffers: shared hit=1
9. 0.216 0.216 ↑ 1.0 20 3

Seq Scan on public.pgbench_lookup1 l1 (cost=0.00..1.20 rows=20 width=23) (actual time=0.040..0.072 rows=20 loops=3)

  • Output: l1.data, l1.id
  • Buffers: shared hit=3
  • Worker 0: actual time=0.044..0.077 rows=20 loops=1
  • Buffers: shared hit=1
  • Worker 1: actual time=0.049..0.080 rows=20 loops=1
  • Buffers: shared hit=1
10. 0.300 0.798 ↑ 1.0 40 3

Hash (cost=1.40..1.40 rows=40 width=8) (actual time=0.266..0.266 rows=40 loops=3)

  • Output: l2.id
  • Buckets: 1024 Batches: 1 Memory Usage: 6kB
  • Buffers: shared hit=3
  • Worker 0: actual time=0.288..0.288 rows=40 loops=1
  • Buffers: shared hit=1
  • Worker 1: actual time=0.288..0.288 rows=40 loops=1
  • Buffers: shared hit=1
11. 0.498 0.498 ↑ 1.0 40 3

Seq Scan on public.pgbench_lookup2 l2 (cost=0.00..1.40 rows=40 width=8) (actual time=0.108..0.166 rows=40 loops=3)

  • Output: l2.id
  • Buffers: shared hit=3
  • Worker 0: actual time=0.141..0.194 rows=40 loops=1
  • Buffers: shared hit=1
  • Worker 1: actual time=0.128..0.188 rows=40 loops=1
  • Buffers: shared hit=1
Planning time : 8.618 ms
Execution time : 515.213 ms