explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bAjp

Settings
# exclusive inclusive rows x rows loops node
1. 0.027 1,640.936 ↑ 1.0 1 1

Aggregate (cost=372,984.29..372,984.30 rows=1 width=8) (actual time=1,640.936..1,640.936 rows=1 loops=1)

2. 20.280 1,640.909 ↑ 25.3 7 1

Nested Loop Anti Join (cost=1.88..372,983.85 rows=177 width=0) (actual time=937.154..1,640.909 rows=7 loops=1)

  • Join Filter: (SubPlan 2)
  • Rows Removed by Join Filter: 777883
3. 0.271 20.885 ↓ 2.6 936 1

Nested Loop Semi Join (cost=1.88..1,035.60 rows=354 width=7) (actual time=0.231..20.885 rows=936 loops=1)

  • Join Filter: (c_order.c_order_id = m_inout.c_order_id)
4. 2.008 15.904 ↓ 2.6 942 1

Merge Semi Join (cost=1.60..892.09 rows=358 width=14) (actual time=0.193..15.904 rows=942 loops=1)

  • Merge Cond: (c_order.c_order_id = c_invoice.c_order_id)
5. 5.586 5.610 ↓ 2.4 945 1

Index Scan using c_order_pkey on c_order (cost=1.31..598.18 rows=387 width=7) (actual time=0.111..5.610 rows=945 loops=1)

  • Filter: (((c_order_id IS NULL) OR (NOT (hashed SubPlan 1))) AND (ad_client_id = '1000000'::numeric) AND (docstatus = 'CO'::bpchar) AND (issotrx = 'Y'::bpchar) AND (ad_org_id = ANY ('{0,5000003,1000001}'::numeric[])))
  • Rows Removed by Filter: 874
6.          

SubPlan (for Index Scan)

7. 0.024 0.024 ↓ 0.0 0 1

Seq Scan on ad_private_access (cost=0.00..1.03 rows=1 width=16) (actual time=0.023..0.024 rows=0 loops=1)

  • Filter: ((ad_user_id <> '5000051'::numeric) AND (ad_table_id = '259'::numeric) AND (isactive = 'Y'::bpchar))
  • Rows Removed by Filter: 4
8. 8.286 8.286 ↑ 3.6 1,771 1

Index Scan using c_invoice_order on c_invoice (cost=0.28..1,104.88 rows=6,442 width=7) (actual time=0.013..8.286 rows=1,771 loops=1)

  • Filter: (docstatus = 'CO'::bpchar)
  • Rows Removed by Filter: 139
9. 4.710 4.710 ↑ 1.0 1 942

Index Scan using m_inout_order on m_inout (cost=0.28..0.39 rows=1 width=7) (actual time=0.005..0.005 rows=1 loops=942)

  • Index Cond: (c_order_id = c_invoice.c_order_id)
  • Filter: (docstatus = 'CO'::bpchar)
  • Rows Removed by Filter: 0
10. 39.764 42.120 ↑ 1.8 832 936

Materialize (cost=0.00..86.38 rows=1,492 width=7) (actual time=0.000..0.045 rows=832 loops=936)

11. 2.356 2.356 ↑ 1.0 1,492 1

Seq Scan on cof_packinglist_line (cost=0.00..78.92 rows=1,492 width=7) (actual time=0.016..2.356 rows=1,492 loops=1)

12.          

SubPlan (for Nested Loop Anti Join)

13. 1,557.624 1,557.624 ↑ 1.0 1 778,812

Index Scan using m_inout_order on m_inout m_inout_1 (cost=0.28..2.50 rows=1 width=7) (actual time=0.001..0.002 rows=1 loops=778,812)

  • Index Cond: (c_order_id = c_order.c_order_id)
  • Filter: (docstatus = 'CO'::bpchar)
  • Rows Removed by Filter: 0
Planning time : 5.583 ms
Execution time : 1,641.807 ms