explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Re6z

Settings
# exclusive inclusive rows x rows loops node
1. 1.138 1,005.424 ↑ 1.0 1 1

Aggregate (cost=52,055.67..52,055.68 rows=1 width=32) (actual time=1,005.424..1,005.424 rows=1 loops=1)

  • Output: max((t1.data)::text)
  • Buffers: shared hit=20700
2. 529.651 1,004.286 ↓ 1.0 2,000 1

Hash Join (cost=5,838.83..52,050.70 rows=1,987 width=33) (actual time=3.324..1,004.286 rows=2,000 loops=1)

  • Output: t1.data
  • Hash Cond: (t2.id = t1.id)
  • Buffers: shared hit=20700
3. 471.324 471.324 ↑ 1.0 2,000,000 1

Seq Scan on public.t2 (cost=0.00..38,692.00 rows=2,000,000 width=4) (actual time=0.006..471.324 rows=2,000,000 loops=1)

  • Output: t2.id, t2.milli, t2.centi, t2.data
  • Buffers: shared hit=18692
4. 0.622 3.311 ↓ 1.0 2,000 1

Hash (cost=5,814.00..5,814.00 rows=1,987 width=37) (actual time=3.310..3.311 rows=2,000 loops=1)

  • Output: t1.data, t1.id
  • Buckets: 2048 Batches: 1 Memory Usage: 157kB
  • Buffers: shared hit=2008
5. 2.392 2.689 ↓ 1.0 2,000 1

Bitmap Heap Scan on public.t1 (cost=39.83..5,814.00 rows=1,987 width=37) (actual time=0.527..2.689 rows=2,000 loops=1)

  • Output: t1.data, t1.id
  • Recheck Cond: (t1.milli = 1)
  • Heap Blocks: exact=2000
  • Buffers: shared hit=2008
6. 0.297 0.297 ↓ 1.0 2,000 1

Bitmap Index Scan on t1_milli (cost=0.00..39.33 rows=1,987 width=0) (actual time=0.297..0.297 rows=2,000 loops=1)

  • Index Cond: (t1.milli = 1)
  • Buffers: shared hit=8