explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vKI3

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.359 561.816 ↑ 12.2 157 1

Subquery Scan on fil_shippable_solines (cost=3,228,470.61..3,228,494.58 rows=1,918 width=250) (actual time=561.274..561.816 rows=157 loops=1)

2. 0.899 561.457 ↑ 12.2 157 1

Sort (cost=3,228,470.61..3,228,475.40 rows=1,918 width=231) (actual time=561.270..561.457 rows=157 loops=1)

  • Sort Key: co.documentno DESC, line.line
  • Sort Method: quicksort Memory: 66kB
3. 1.023 560.558 ↑ 12.2 157 1

Nested Loop Left Join (cost=0.84..3,228,366.02 rows=1,918 width=231) (actual time=5.681..560.558 rows=157 loops=1)

4. 0.928 558.593 ↑ 12.2 157 1

Nested Loop Left Join (cost=0.56..3,226,967.41 rows=1,918 width=224) (actual time=5.665..558.593 rows=157 loops=1)

5. 6.873 556.566 ↑ 12.2 157 1

Nested Loop (cost=0.29..3,225,573.60 rows=1,918 width=223) (actual time=5.649..556.566 rows=157 loops=1)

6. 3.819 3.819 ↓ 1.2 1,902 1

Seq Scan on c_order co (cost=0.00..164.63 rows=1,622 width=30) (actual time=0.009..3.819 rows=1,902 loops=1)

  • Filter: ((docstatus = ANY ('{IP,CO}'::bpchar[])) AND (issotrx = 'Y'::bpchar))
  • Rows Removed by Filter: 509
7. 16.156 545.874 ↓ 0.0 0 1,902

Index Scan using c_orderline_order on c_orderline line (cost=0.29..1,988.53 rows=1 width=199) (actual time=0.101..0.287 rows=0 loops=1,902)

  • Index Cond: (c_order_id = co.c_order_id)
  • Filter: ((qtydelivered <> qtyordered) AND (fil_replenishedqty <> qtyordered) AND (c_bpartner_id = '1000208'::numeric) AND (qtyordered <> ((SubPlan 1) + (SubPlan 2))))
  • Rows Removed by Filter: 4
8.          

SubPlan (for Index Scan)

9. 0.942 266.586 ↑ 1.0 1 157

Aggregate (cost=248.33..248.34 rows=1 width=4) (actual time=1.697..1.698 rows=1 loops=157)

10. 265.644 265.644 ↓ 0.0 0 157

Seq Scan on m_packageline l (cost=0.00..248.32 rows=1 width=4) (actual time=1.692..1.692 rows=0 loops=157)

  • Filter: (c_orderline_id = line.c_orderline_id)
  • Rows Removed by Filter: 6,426
11. 1.099 263.132 ↑ 1.0 1 157

Aggregate (cost=248.33..248.34 rows=1 width=3) (actual time=1.675..1.676 rows=1 loops=157)

12. 262.033 262.033 ↓ 0.0 0 157

Seq Scan on m_packageline l_1 (cost=0.00..248.32 rows=1 width=3) (actual time=1.669..1.669 rows=0 loops=157)

  • Filter: (c_orderline_id = line.c_orderline_id)
  • Rows Removed by Filter: 6,426
13. 1.099 1.099 ↑ 1.0 1 157

Index Scan using c_bpartner_pkey on c_bpartner bp (cost=0.28..0.72 rows=1 width=13) (actual time=0.005..0.007 rows=1 loops=157)

  • Index Cond: (co.c_bpartner_id = c_bpartner_id)
14. 0.942 0.942 ↑ 1.0 1 157

Index Scan using c_bpartner_pkey on c_bpartner subbp (cost=0.28..0.72 rows=1 width=13) (actual time=0.004..0.006 rows=1 loops=157)

  • Index Cond: (co.fil_sub_bpartner_id = c_bpartner_id)
Planning time : 1.281 ms
Execution time : 562.181 ms