explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cTxEO : Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: replenishment; plan #5LIH; plan #BNVh; plan #9C6; plan #CDvl; plan #o8ML

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.007 4.212 ↑ 3.0 1 1

Append (cost=0.56..3,020.33 rows=3 width=93) (actual time=0.187..4.212 rows=1 loops=1)

2. 0.017 0.195 ↑ 1.0 1 1

Nested Loop (cost=0.56..36.70 rows=1 width=91) (actual time=0.184..0.195 rows=1 loops=1)

3. 0.007 0.168 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.29..27.88 rows=1 width=82) (actual time=0.165..0.168 rows=1 loops=1)

4. 0.159 0.159 ↑ 1.0 1 1

Seq Scan on m_requisitionline line (cost=0.00..19.56 rows=1 width=77) (actual time=0.158..0.159 rows=1 loops=1)

  • Filter: (ref_orderline_id = '1009603'::numeric)
  • Rows Removed by Filter: 445
5. 0.002 0.002 ↓ 0.0 0 1

Index Scan using c_orderline_pkey on c_orderline poline (cost=0.29..8.30 rows=1 width=12) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: (line.c_orderline_id = c_orderline_id)
6. 0.010 0.010 ↑ 1.0 1 1

Index Scan using m_requisition_pkey on m_requisition req (cost=0.27..8.29 rows=1 width=15) (actual time=0.005..0.010 rows=1 loops=1)

  • Index Cond: (m_requisition_id = line.m_requisition_id)
7. 0.002 3.240 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=591.21..2,915.04 rows=1 width=97) (actual time=3.240..3.240 rows=0 loops=1)

8. 0.003 3.238 ↓ 0.0 0 1

Nested Loop (cost=591.21..2,915.03 rows=1 width=97) (actual time=3.238..3.238 rows=0 loops=1)

9. 0.010 3.235 ↓ 0.0 0 1

Hash Join (cost=590.93..2,907.75 rows=1 width=99) (actual time=3.235..3.235 rows=0 loops=1)

  • Hash Cond: (line_1.m_production_id = prod.m_production_id)
10. 0.006 0.006 ↑ 12,953.0 1 1

Seq Scan on m_productionline line_1 (cost=0.00..2,268.24 rows=12,953 width=63) (actual time=0.006..0.006 rows=1 loops=1)

  • Filter: ((isendproduct = 'Y'::bpchar) AND (ismanual = 'N'::bpchar))
11. 0.002 3.219 ↓ 0.0 0 1

Hash (cost=590.91..590.91 rows=1 width=42) (actual time=3.219..3.219 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
12. 3.217 3.217 ↓ 0.0 0 1

Seq Scan on m_production prod (cost=0.00..590.91 rows=1 width=42) (actual time=3.217..3.217 rows=0 loops=1)

  • Filter: (c_orderline_id = '1009603'::numeric)
  • Rows Removed by Filter: 12,794
13. 0.000 0.000 ↓ 0.0 0

Index Scan using m_product_pkey on m_product product (cost=0.29..0.69 rows=1 width=11) (never executed)

  • Index Cond: (m_product_id = line_1.m_product_id)
14.          

SubPlan (for Nested Loop)

15. 0.000 0.000 ↓ 0.0 0

Limit (cost=1.05..1.06 rows=1 width=64) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.05..1.06 rows=1 width=64) (never executed)

  • Sort Key: brk.breakvalue DESC
17. 0.000 0.000 ↓ 0.0 0

Seq Scan on fil_processingtime_break brk (cost=0.00..1.04 rows=1 width=64) (never executed)

  • Filter: ((line_1.movementqty >= breakvalue) AND (fil_processingtime_id = product.fil_processingtime_id))
18. 0.000 0.000 ↓ 0.0 0

Limit (cost=1.05..1.06 rows=1 width=64) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.05..1.06 rows=1 width=64) (never executed)

  • Sort Key: brk_1.breakvalue DESC
20. 0.000 0.000 ↓ 0.0 0

Seq Scan on fil_processingtime_break brk_1 (cost=0.00..1.04 rows=1 width=64) (never executed)

  • Filter: ((line_1.movementqty >= breakvalue) AND (fil_processingtime_id = product.fil_processingtime_id))
21. 0.000 0.000 ↓ 0.0 0

Limit (cost=1.05..1.06 rows=1 width=64) (never executed)

22. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.05..1.06 rows=1 width=64) (never executed)

  • Sort Key: brk_2.breakvalue DESC
23. 0.000 0.000 ↓ 0.0 0

Seq Scan on fil_processingtime_break brk_2 (cost=0.00..1.04 rows=1 width=64) (never executed)

  • Filter: ((line_1.movementqty >= breakvalue) AND (fil_processingtime_id = product.fil_processingtime_id))
24. 0.000 0.000 ↓ 0.0 0

Limit (cost=1.05..1.06 rows=1 width=64) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.05..1.06 rows=1 width=64) (never executed)

  • Sort Key: brk_3.breakvalue DESC
26. 0.000 0.000 ↓ 0.0 0

Seq Scan on fil_processingtime_break brk_3 (cost=0.00..1.04 rows=1 width=64) (never executed)

  • Filter: ((line_1.movementqty >= breakvalue) AND (fil_processingtime_id = product.fil_processingtime_id))
27. 0.000 0.000 ↓ 0.0 0

Limit (cost=1.05..1.06 rows=1 width=64) (never executed)

28. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.05..1.06 rows=1 width=64) (never executed)

  • Sort Key: brk_4.breakvalue DESC
29. 0.000 0.000 ↓ 0.0 0

Seq Scan on fil_processingtime_break brk_4 (cost=0.00..1.04 rows=1 width=64) (never executed)

  • Filter: ((line_1.movementqty >= breakvalue) AND (fil_processingtime_id = product.fil_processingtime_id))
30. 0.002 0.770 ↓ 0.0 0 1

Nested Loop (cost=0.28..68.58 rows=1 width=90) (actual time=0.770..0.770 rows=0 loops=1)

31. 0.768 0.768 ↓ 0.0 0 1

Seq Scan on m_movement mov (cost=0.00..59.75 rows=1 width=41) (actual time=0.768..0.768 rows=0 loops=1)

  • Filter: ((docstatus <> 'VO'::bpchar) AND (c_orderline_id = '1009603'::numeric))
  • Rows Removed by Filter: 1,291
32. 0.000 0.000 ↓ 0.0 0

Index Scan using m_movementline_movement on m_movementline line_2 (cost=0.28..8.29 rows=1 width=55) (never executed)

  • Index Cond: (m_movement_id = mov.m_movement_id)
Planning time : 1.506 ms
Execution time : 4.455 ms