details: https://code.openbravo.com/erp/devel/pi/rev/4d918d964e28 changeset: 35459:4d918d964e28 user: Atul Gaware <atul.gaware <at> openbravo.com> date: Wed Feb 20 09:46:02 2019 +0530 summary: Fixes Issue 0040208:Unpost process can be very slow
To use existing index fact_acct_table_record_id for ad_table_id and record_id columns of fact_acct, ad_table_id is added in AND clause of exists subquery from fact_acct table only if record id is sent to getDocbasetypes method. diffstat: src/org/openbravo/financial/ResetAccounting.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r 103337abd545 -r 4d918d964e28 src/org/openbravo/financial/ResetAccounting.java --- a/src/org/openbravo/financial/ResetAccounting.java Mon Feb 11 22:14:02 2019 -0300 +++ b/src/org/openbravo/financial/ResetAccounting.java Wed Feb 20 09:46:02 2019 +0530 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2013-2018 Openbravo SLU + * All portions are Copyright (C) 2013-2019 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************* @@ -449,7 +449,7 @@ + " and exists (select 1 from FinancialMgmtAccountingFact e where e.documentCategory=d.documentCategory "; if (!"".equals(recordId)) { - myQuery = myQuery + "and e.recordID=:recordId"; + myQuery = myQuery + "and e.table.id =:tableId and e.recordID=:recordId"; } myQuery = myQuery + ")"; Query<String> query = OBDal.getInstance().getSession().createQuery(myQuery, String.class); _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits