explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AWhC : Optimization for: plan #yjCs

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.006 637.818 ↑ 1.0 1 1

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

2. 0.027 637.812 ↑ 1.0 1 1

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

3.          

Initplan (forAggregate)

4. 0.072 314.169 ↑ 1.0 1 1

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

5. 9.345 314.097 ↓ 1.2 53 1

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

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

  • Workers Planned: 4
  • Workers Launched: 4
7. 30.420 231.649 ↑ 1.0 1,052 5

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

8. 201.206 201.206 ↑ 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.059..201.206 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.023 0.023 ↓ 0.0 0 5,262

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

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

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

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

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

12. 12.590 323.616 ↑ 1,050.8 5 1

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

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

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