details: https://code.openbravo.com/erp/devel/pi/rev/6e7197baba41 changeset: 32586:6e7197baba41 user: Mark <markmm82 <at> gmail.com> date: Tue Aug 15 15:00:49 2017 -0400 summary: Fixes issue 36684: Performance problem in Goods Receipt selector
Performance problem in Goods Receipt selector of Landed Cost window. Selector whereclause was refactored using exists and avoid cross joins to improve performance. diffstat: src-db/database/sourcedata/OBUISEL_SELECTOR.xml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 3e0bc2ad77c6 -r 6e7197baba41 src-db/database/sourcedata/OBUISEL_SELECTOR.xml --- a/src-db/database/sourcedata/OBUISEL_SELECTOR.xml Tue Aug 15 15:00:49 2017 -0400 +++ b/src-db/database/sourcedata/OBUISEL_SELECTOR.xml Tue Aug 15 15:00:49 2017 -0400 @@ -1246,7 +1246,7 @@ <!--F3CDEE79343F4746A2FEE8C60EBEC0BF--> <NAME><![CDATA[Receipts]]></NAME> <!--F3CDEE79343F4746A2FEE8C60EBEC0BF--> <AD_REFERENCE_ID><![CDATA[E68CCF4495A34ED7902293A930386B93]]></AD_REFERENCE_ID> <!--F3CDEE79343F4746A2FEE8C60EBEC0BF--> <AD_TABLE_ID><![CDATA[319]]></AD_TABLE_ID> -<!--F3CDEE79343F4746A2FEE8C60EBEC0BF--> <WHERECLAUSE><![CDATA[e.salesTransaction = false and e.documentStatus = 'CO' and exists (select 1 from MaterialMgmtShipmentInOutLine m where m.shipmentReceipt.id=e.id and m.movementQuantity >= 0) and exists (select 1 from MaterialMgmtMaterialTransaction t, CostingRule r where t.goodsShipmentLine.shipmentReceipt.id=e.id and r.validated = 'Y' and ad_org_isinnaturaltree(r.organization.id, t.organization.id, t.client.id) = 'Y' and r.endingDate is null and (r.startingDate is null or r.startingDate <= t.transactionProcessDate)) ]]></WHERECLAUSE> +<!--F3CDEE79343F4746A2FEE8C60EBEC0BF--> <WHERECLAUSE><![CDATA[e.salesTransaction = false and e.documentStatus = 'CO' and exists (select 1 from MaterialMgmtMaterialTransaction t join t.goodsShipmentLine iol where iol.shipmentReceipt.id = e.id and iol.movementQuantity >= 0 and exists (select 1 from CostingRule r where r.validated = 'Y' and ad_org_isinnaturaltree(r.organization.id, t.organization.id, t.client.id) = 'Y' and r.endingDate is null and (r.startingDate is null or r.startingDate <= t.transactionProcessDate)))]]></WHERECLAUSE> <!--F3CDEE79343F4746A2FEE8C60EBEC0BF--> <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID> <!--F3CDEE79343F4746A2FEE8C60EBEC0BF--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--F3CDEE79343F4746A2FEE8C60EBEC0BF--> <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
