explain.depesz.com

PostgreSQL's explain analyze made readable

Result: h85h

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=7,524,821.26..87,634,610.14 rows=9,380,934 width=212) (actual rows= loops=)

  • Hash Cond: (il.c_charge_id = ch.c_charge_id)
2. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=7,524,654.23..8,306,113.22 rows=9,380,934 width=192) (actual rows= loops=)

  • Hash Cond: ((uomc.c_uom_id = uom.c_uom_id) AND (uomc.c_uom_to_id = pd.c_uom_id))
3. 0.000 0.000 ↓ 0.0

Seq Scan on c_uom_conversion uomc (cost=0.00..379.08 rows=15,908 width=18) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Hash (cost=7,127,430.22..7,127,430.22 rows=9,380,934 width=199) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,560,314.17..7,127,430.22 rows=9,380,934 width=199) (actual rows= loops=)

  • Hash Cond: (il.c_uom_id = uom.c_uom_id)
6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,560,284.18..6,998,412.39 rows=9,380,934 width=199) (actual rows= loops=)

  • Hash Cond: (il.m_product_id = pd.m_product_id)
7. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,546,820.72..6,342,783.87 rows=9,380,934 width=193) (actual rows= loops=)

  • Hash Cond: ((pr.m_product_category_id = prca.m_product_category_id) AND (i.ad_client_id = prca.ad_client_id))
8. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,546,678.34..4,453,480.43 rows=9,380,934 width=198) (actual rows= loops=)

  • Hash Cond: (il.m_product_id = pr.m_product_id)
9. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,533,214.88..3,816,173.91 rows=9,380,934 width=191) (actual rows= loops=)

  • Hash Cond: (il.c_invoice_id = i.c_invoice_id)
10. 0.000 0.000 ↓ 0.0

Seq Scan on c_invoiceline il (cost=0.00..1,314,851.32 rows=24,611,832 width=97) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash (cost=1,510,024.16..1,510,024.16 rows=824,538 width=100) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=7,652.24..1,510,024.16 rows=824,538 width=100) (actual rows= loops=)

  • Hash Cond: (c.exme_operador_id = opc.exme_operador_id)
13. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=7,594.07..1,498,628.60 rows=824,538 width=100) (actual rows= loops=)

  • Hash Cond: (i.c_cash_id = c.c_cash_id)
14. 0.000 0.000 ↓ 0.0

Hash Join (cost=587.61..1,454,949.98 rows=824,538 width=99) (actual rows= loops=)

  • Hash Cond: (i.c_doctype_id = dt.c_doctype_id)
  • Join Filter: CASE WHEN ((dt.docbasetype = 'ARI'::bpchar) AND (dt.docsubtypeso IS NULL)) THEN ((NOT (SubPlan 2)) AND (i.docstatus = ANY ('{CO,CL}'::bpchar[])) AND (i.multiple_id IS NULL)) ELSE true END
15. 0.000 0.000 ↓ 0.0

Hash Join (cost=6.91..384,555.40 rows=1,649,076 width=111) (actual rows= loops=)

  • Hash Cond: (i.ad_client_id = sch.ad_client_id)
16. 0.000 0.000 ↓ 0.0

Seq Scan on c_invoice i (cost=0.00..361,792.33 rows=1,670,774 width=104) (actual rows= loops=)

  • Filter: ((c_doctype_id > '0'::numeric) AND (issotrx = 'Y'::bpchar) AND (isactive = 'Y'::bpchar) AND (docstatus = ANY ('{CO,CL,VO,RE}'::bpchar[])))
17. 0.000 0.000 ↓ 0.0

Hash (cost=5.96..5.96 rows=76 width=13) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on c_acctschema sch (cost=0.00..5.96 rows=76 width=13) (actual rows= loops=)

  • Filter: (isactive = 'Y'::bpchar)
19. 0.000 0.000 ↓ 0.0

Hash (cost=459.20..459.20 rows=9,720 width=13) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Seq Scan on c_doctype dt (cost=0.00..459.20 rows=9,720 width=13) (actual rows= loops=)

21.          

SubPlan (forHash Join)

22. 0.000 0.000 ↓ 0.0

Index Only Scan using c_invoice_ref_invoice_sales_id on c_invoice f (cost=0.43..9.63 rows=46 width=0) (actual rows= loops=)

  • Index Cond: (ref_invoice_sales_id = i.c_invoice_id)
23. 0.000 0.000 ↓ 0.0

Hash (cost=5,162.65..5,162.65 rows=106,065 width=13) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Seq Scan on c_cash c (cost=0.00..5,162.65 rows=106,065 width=13) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Hash (cost=40.85..40.85 rows=1,385 width=7) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Seq Scan on exme_operador opc (cost=0.00..40.85 rows=1,385 width=7) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Hash (cost=9,853.65..9,853.65 rows=207,665 width=13) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Seq Scan on m_product pr (cost=0.00..9,853.65 rows=207,665 width=13) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Hash (cost=105.55..105.55 rows=2,455 width=15) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Seq Scan on m_product_category_acct prca (cost=0.00..105.55 rows=2,455 width=15) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Hash (cost=9,853.65..9,853.65 rows=207,665 width=12) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Seq Scan on m_product pd (cost=0.00..9,853.65 rows=207,665 width=12) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Hash (cost=20.55..20.55 rows=755 width=6) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Seq Scan on c_uom uom (cost=0.00..20.55 rows=755 width=6) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Hash (cost=123.68..123.68 rows=3,468 width=27) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Seq Scan on c_charge ch (cost=0.00..123.68 rows=3,468 width=27) (actual rows= loops=)

37.          

SubPlan (forHash Left Join)

38. 0.000 0.000 ↓ 0.0

Limit (cost=0.43..8.45 rows=1 width=6) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Index Scan using exme_ctapacdet_pkey on exme_ctapacdet cpd (cost=0.43..8.45 rows=1 width=6) (actual rows= loops=)

  • Index Cond: (exme_ctapacdet_id = il.exme_ctapacdet_id)