explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BOwP

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 35.326 63.025 ↓ 1.0 14,935 1

Hash Left Join (cost=1,502.15..3,241.76 rows=14,347 width=212) (actual time=18.455..63.025 rows=14,935 loops=1)

  • Hash Cond: (bb.id_handlowca = cc.kod)
2. 7.111 27.667 ↓ 1.0 14,935 1

Hash Left Join (cost=1,497.12..2,967.83 rows=14,347 width=8) (actual time=18.409..27.667 rows=14,935 loops=1)

  • Hash Cond: ((spd_kontrahenci_hand.id_kontrahenta = bb.id_kontrahenta) AND ((max(spd_kontrahenci_hand.od_kiedy)) = bb.od_kiedy))
3. 9.719 11.866 ↓ 1.0 14,935 1

HashAggregate (cost=606.92..750.39 rows=14,347 width=8) (actual time=9.698..11.866 rows=14,935 loops=1)

4. 2.147 2.147 ↓ 1.0 28,386 1

Seq Scan on spd_kontrahenci_hand (cost=0.00..465.28 rows=28,328 width=8) (actual time=0.005..2.147 rows=28,386 loops=1)

5. 5.230 8.690 ↓ 1.0 28,386 1

Hash (cost=465.28..465.28 rows=28,328 width=12) (actual time=8.690..8.690 rows=28,386 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 1220kB
6. 3.460 3.460 ↓ 1.0 28,386 1

Seq Scan on spd_kontrahenci_hand bb (cost=0.00..465.28 rows=28,328 width=12) (actual time=0.003..3.460 rows=28,386 loops=1)

7. 0.020 0.032 ↓ 1.0 48 1

Hash (cost=4.46..4.46 rows=46 width=208) (actual time=0.032..0.032 rows=48 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
8. 0.012 0.012 ↓ 1.0 48 1

Seq Scan on spd_handlowcy cc (cost=0.00..4.46 rows=46 width=208) (actual time=0.003..0.012 rows=48 loops=1)

Total runtime : 63.576 ms