explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yjCs

Settings

Optimization(s) for this plan:

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

Subquery Scan on t1 (cost=79,310.87..79,310.88 rows=1 width=32) (actual time=1,777.864..1,777.866 rows=1 loops=1)

2. 0.023 1,777.860 ↑ 1.0 1 1

Aggregate (cost=79,310.87..79,310.87 rows=1 width=96) (actual time=1,777.859..1,777.860 rows=1 loops=1)

3.          

Initplan (forAggregate)

4. 0.089 1,030.994 ↑ 1.0 1 1

Aggregate (cost=42,017.16..42,017.16 rows=1 width=32) (actual time=1,030.994..1,030.994 rows=1 loops=1)

5. 6.474 1,030.905 ↓ 1.2 53 1

Hash Left Join (cost=4,162.33..42,017.06 rows=46 width=10) (actual time=902.605..1,030.905 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 438.682 ↓ 1.2 5,262 1

Gather (cost=1,000.08..38,827.03 rows=4,259 width=30) (actual time=1.119..438.682 rows=5,262 loops=1)

  • Workers Planned: 4
  • Workers Launched: 2
7. 108.716 752.911 ↓ 1.6 1,754 3

Nested Loop Left Join (cost=0.08..37,401.13 rows=1,065 width=30) (actual time=0.080..752.911 rows=1,754 loops=3)

8. 644.149 644.149 ↓ 1.6 1,754 3

Parallel Seq Scan on intran intran_1 (cost=0.00..35,248.43 rows=1,065 width=26) (actual time=0.053..644.149 rows=1,754 loops=3)

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

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

  • Index Cond: ((intran_1.doc_aid)::text = (autoid)::text)
10. 257.338 585.749 ↓ 1.0 85,272 1

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

  • Buckets: 131072 Batches: 1 Memory Usage: 5822kB
11. 328.411 328.411 ↓ 1.0 85,272 1

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

12. 13.922 746.843 ↑ 1,051.4 5 1

Gather (cost=1,000.00..37,277.94 rows=5,257 width=15) (actual time=746.838..746.843 rows=5 loops=1)

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

Parallel Seq Scan on intran (cost=0.00..35,752.24 rows=1,314 width=15) (actual time=692.780..732.921 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: 268525