explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

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

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

2. 0.034 353.398 ↑ 1.0 1 1

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

3.          

Initplan (forAggregate)

4. 0.080 167.202 ↑ 1.0 1 1

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

5. 4.831 167.122 ↓ 1.2 53 1

Hash Left Join (cost=4,162.33..42,014.26 rows=46 width=10) (actual time=143.987..167.122 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 41.796 ↓ 1.2 5,262 1

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

  • Workers Planned: 4
  • Workers Launched: 4
7. 16.858 130.344 ↑ 1.0 1,052 5

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

8. 113.473 113.473 ↑ 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.048..113.473 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: 267489
9. 0.013 0.013 ↓ 0.0 0 5,262

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

  • Index Cond: ((intran_1.doc_aid)::text = (autoid)::text)
10. 55.567 120.495 ↓ 1.0 85,287 1

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

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

Seq Scan on inmfg (cost=0.00..2,863.80 rows=85,268 width=25) (actual time=0.006..64.928 rows=85,287 loops=1)

12. 5.684 186.162 ↑ 1,050.8 5 1

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

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

Parallel Seq Scan on intran (cost=0.00..35,751.03 rows=1,314 width=15) (actual time=170.558..180.478 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: 268541