explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3BN1 : Optimization for: Optimization for: Optimization for: plan #fh1o; plan #Ppm6; plan #2XqE

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 45.250 94.871 ↓ 386.7 41,764 1

Hash Join (cost=4,082.68..10,794.69 rows=108 width=89) (actual time=38.387..94.871 rows=41,764 loops=1)

  • Hash Cond: (((block_history.key)::text = (b.key)::text) AND ((max(block_history.ver)) = b.ver))
2. 24.689 28.227 ↑ 1.0 41,764 1

HashAggregate (cost=1,464.51..1,897.21 rows=43,270 width=17) (actual time=16.887..28.227 rows=41,764 loops=1)

  • Group Key: block_history.key
3. 3.538 3.538 ↑ 1.1 44,254 1

Seq Scan on block_history (cost=0.00..1,230.67 rows=46,767 width=17) (actual time=0.012..3.538 rows=44,254 loops=1)

4. 14.740 21.394 ↑ 1.1 44,254 1

Hash (cost=1,230.67..1,230.67 rows=46,767 width=93) (actual time=21.394..21.394 rows=44,254 loops=1)

  • Buckets: 32768 Batches: 2 Memory Usage: 3104kB
5. 6.654 6.654 ↑ 1.1 44,254 1

Seq Scan on block_history b (cost=0.00..1,230.67 rows=46,767 width=93) (actual time=0.013..6.654 rows=44,254 loops=1)

Planning time : 0.208 ms
Execution time : 97.902 ms