explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WOyF : Optimization for: Optimization for: plan #yjCs; plan #AWhC

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.004 534.512 ↑ 1.0 1 1

Subquery Scan on t1 (cost=79,306.55..79,306.56 rows=1 width=32) (actual time=534.510..534.512 rows=1 loops=1)

2. 0.022 534.508 ↑ 1.0 1 1

Aggregate (cost=79,306.55..79,306.55 rows=1 width=96) (actual time=534.507..534.508 rows=1 loops=1)

3.          

Initplan (forAggregate)

4. 0.065 188.147 ↑ 1.0 1 1

Aggregate (cost=42,014.36..42,014.36 rows=1 width=32) (actual time=188.146..188.147 rows=1 loops=1)

5. 9.395 188.082 ↓ 1.2 53 1

Hash Left Join (cost=4,162.33..42,014.26 rows=46 width=10) (actual time=168.116..188.082 rows=53 loops=1)

  • Hash Cond: ((intran_1.doc_aid)::text = (inmfg.autoid)::text)
  • Filter: ((arinv.progress = '40'::numeric) OR ((COALESCE((inmfg.start_date)::timestamp with time zone, now()) <= now()) AND (inmfg.status <> '1'::numeric)))
  • Rows Removed by Filter: 5209
6. 0.000 51.855 ↓ 1.2 5,262 1

Gather (cost=1,000.08..38,824.25 rows=4,256 width=30) (actual time=1.046..51.855 rows=5,262 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
7. 18.972 150.853 ↑ 1.0 1,052 5

Nested Loop Left Join (cost=0.08..37,398.65 rows=1,064 width=30) (actual time=0.126..150.853 rows=1,052 loops=5)

8. 131.867 131.867 ↑ 1.0 1,052 5

Parallel Seq Scan on intran intran_1 (cost=0.00..35,247.52 rows=1,064 width=26) (actual time=0.102..131.867 rows=1,052 loops=5)

  • Filter: (((inven)::text = 'AMLBBL'::text) AND ((warehouse)::text = '1-MAIN'::text) AND ((doc_role)::text = 'O'::text))
  • Rows Removed by Filter: 267484
9. 0.014 0.014 ↓ 0.0 0 5,262

Index Scan using arinv_pkey on arinv (cost=0.08..2.02 rows=1 width=21) (actual time=0.014..0.014 rows=0 loops=5,262)

  • Index Cond: ((intran_1.doc_aid)::text = (autoid)::text)
10. 56.563 126.832 ↓ 1.0 85,283 1

Hash (cost=2,863.80..2,863.80 rows=85,268 width=25) (actual time=126.832..126.832 rows=85,283 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 5823kB
11. 70.269 70.269 ↓ 1.0 85,283 1

Seq Scan on inmfg (cost=0.00..2,863.80 rows=85,268 width=25) (actual time=0.009..70.269 rows=85,283 loops=1)

12. 7.863 346.339 ↑ 1,050.8 5 1

Gather (cost=1,000.00..37,276.43 rows=5,254 width=15) (actual time=346.149..346.339 rows=5 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
13. 338.476 338.476 ↑ 1,314.0 1 5

Parallel Seq Scan on intran (cost=0.00..35,751.03 rows=1,314 width=15) (actual time=326.428..338.476 rows=1 loops=5)

  • Filter: ((COALESCE(q_order_in, '0'::numeric) <> COALESCE(q_linked_p, '0'::numeric)) AND (COALESCE(q_ship_in, '0'::numeric) <> '0'::numeric) AND ((inven)::text = 'AMLBBL'::text) AND ((warehouse)::text = '1-MAIN'::text) AND ((doc_status <> '0'::numeric) OR ((doc_role)::text <> 'O'::text)))
  • Rows Removed by Filter: 268536