explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2La : Optimization for: plan #tYa

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=0.00..6,473,960.61 rows=1 width=159) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.00..64,739,606.13 rows=10 width=159) (actual rows= loops=)

  • Join Filter: (tfo.bsnr = tforbs.bsnr)
3. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=0.00..64,733,498.94 rows=10 width=36) (actual rows= loops=)

  • Join Filter: (SubPlan 1)
4. 0.000 0.000 ↓ 0.0

Seq Scan on tfo (cost=0.00..170,773.69 rows=19 width=36) (actual rows= loops=)

  • Filter: ((uthdat >= '2019-05-13'::date) AND (uthdat <= '2019-05-13'::date) AND (betstnr = '9700'::bpchar) AND (betstehnr = '00'::bpchar) AND (bsstakod = 'B'::bpchar) AND (kdjbsnr = ' '::bpchar) AND ((lsid = ' '::bpchar) OR (lstotid <= CURRENT_TIMESTAMP)))
5. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..451,980.64 rows=3,373,171 width=9) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Seq Scan on tfor (cost=0.00..432,136.47 rows=3,373,171 width=9) (actual rows= loops=)

  • Filter: (bsrdstakod = 'KL'::bpchar)
7.          

SubPlan (forNested Loop Semi Join)

8. 0.000 0.000 ↓ 0.0

Index Scan using ix_tfo_04 on tfo tfo_1 (cost=0.09..4.11 rows=1 width=9) (actual rows= loops=)

  • Index Cond: (bsalias = tfo.bsalias)
9. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1,792.44 rows=39,404 width=107) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on tforbs (cost=0.00..1,753.04 rows=39,404 width=107) (actual rows= loops=)