explain.depesz.com

PostgreSQL's explain analyze made readable

Result: u6dE : Optimization for: plan #vKI3

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.357 53.104 ↑ 12.2 157 1

Subquery Scan on fil_shippable_solines (cost=111,546.76..111,570.73 rows=1,918 width=250) (actual time=52.557..53.104 rows=157 loops=1)

2. 0.798 52.747 ↑ 12.2 157 1

Sort (cost=111,546.76..111,551.55 rows=1,918 width=231) (actual time=52.553..52.747 rows=157 loops=1)

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

Nested Loop (cost=395.24..111,442.18 rows=1,918 width=231) (actual time=15.661..51.949 rows=157 loops=1)

4. 4.729 27.770 ↓ 1.2 1,902 1

Hash Left Join (cost=394.96..592.81 rows=1,622 width=38) (actual time=12.482..27.770 rows=1,902 loops=1)

  • Hash Cond: (co.fil_sub_bpartner_id = subbp.c_bpartner_id)
5. 6.553 16.898 ↓ 1.2 1,902 1

Hash Left Join (cost=197.48..384.41 rows=1,622 width=31) (actual time=6.325..16.898 rows=1,902 loops=1)

  • Hash Cond: (co.c_bpartner_id = bp.c_bpartner_id)
6. 4.046 4.046 ↓ 1.2 1,902 1

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

  • Filter: ((docstatus = ANY ('{IP,CO}'::bpchar[])) AND (issotrx = 'Y'::bpchar))
  • Rows Removed by Filter: 509
7. 2.627 6.299 ↑ 1.0 1,799 1

Hash (cost=174.99..174.99 rows=1,799 width=13) (actual time=6.299..6.299 rows=1,799 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 85kB
8. 3.672 3.672 ↑ 1.0 1,799 1

Seq Scan on c_bpartner bp (cost=0.00..174.99 rows=1,799 width=13) (actual time=0.010..3.672 rows=1,799 loops=1)

9. 2.789 6.143 ↑ 1.0 1,799 1

Hash (cost=174.99..174.99 rows=1,799 width=13) (actual time=6.143..6.143 rows=1,799 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 85kB
10. 3.354 3.354 ↑ 1.0 1,799 1

Seq Scan on c_bpartner subbp (cost=0.00..174.99 rows=1,799 width=13) (actual time=0.004..3.354 rows=1,799 loops=1)

11. 16.665 19.020 ↓ 0.0 0 1,902

Index Scan using c_orderline_order on c_orderline line (cost=0.29..68.33 rows=1 width=199) (actual time=0.008..0.010 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
12.          

SubPlan (for Index Scan)

13. 0.628 1.256 ↑ 1.0 1 157

Aggregate (cost=8.30..8.31 rows=1 width=4) (actual time=0.007..0.008 rows=1 loops=157)

14. 0.628 0.628 ↓ 0.0 0 157

Index Scan using m_packagelilne_order_id on m_packageline l (cost=0.28..8.30 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=157)

  • Index Cond: (c_orderline_id = line.c_orderline_id)
15. 0.628 1.099 ↑ 1.0 1 157

Aggregate (cost=8.30..8.31 rows=1 width=3) (actual time=0.006..0.007 rows=1 loops=157)

16. 0.471 0.471 ↓ 0.0 0 157

Index Scan using m_packagelilne_order_id on m_packageline l_1 (cost=0.28..8.30 rows=1 width=3) (actual time=0.003..0.003 rows=0 loops=157)

  • Index Cond: (c_orderline_id = line.c_orderline_id)
Planning time : 1.404 ms
Execution time : 53.425 ms