Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0046437
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajoralways2021-04-30 12:242021-05-12 11:14
Reportersalvador_campanellaView Statuspublic 
Assigned Tovmromanos 
PrioritynormalResolutionopenFixed in Version
StatusscheduledFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0046437: Aging report have low performance when is executed in an environment with a huge amount of information

DescriptionAging report have low performance when is executed in an environment with a huge amount of information

The query related with SqlMethod name="selectCredit" is having a low performance
https://gitlab.com/openbravo/devel/openbravo/-/blob/master/src/org/openbravo/erpCommon/ad_reports/AgingDao_data.xsql [^]

Steps To ReproduceExecute the aging report in an environment with a huge amount of information
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0127736)
vmromanos (developer)
2021-05-03 12:33

Please provide the explain plan to properly understand the problem.
(0127753)
salvador_campanella (developer)
2021-05-03 17:46

Sure, Let me share some plans with you:

1.- Aging Credit - Many loops due joins
https://explain.dalibo.com/plan/zvR [^]


2.-Aging Credit Native: https://explain.dalibo.com/plan/QFY [^]
3.-Aging Credit Custom: https://explain.dalibo.com/plan/ETb [^]
(0128009)
vmromanos (developer)
2021-05-11 18:47

Test plan:

Login as Openbravo admin

Create a new business partner:
 Org: Región Norte
 Name and searchkey: credit
 Customer tab:
   Price list: Tarifa de ventas
   Payment method: Transferencia
   Payment terms: Immmediate
   Financial account: Cuenta de Banco
   Invoice Terms: Immediate
 Location/Address:
   Enter any address

Go to Payment In and create a new record.
 Received from: credit
 Amount: 10
 Press Add details and select "Leave the credit to be used later" in the Overpayment Action selector. Press Done

Launch the Receivables Aging Schedule report for "Región Norte" organization. Leave the default filters.
Ensure the "credit" business partner has 10€ of credit, and the balance is -10€

Go to sales invoice window and create a new record for the "credit" business partner.
Enter 10 units of Agua sin Gas.
Complete the invoice.
In the consume credit popup, select the previous 10€ and "Use the Credit".

Launch the Receivables Aging Schedule report for "Región Norte" organization. Leave the default filters.
Ensure the "credit" business partner has 0€ of credit, because we have already consumed it.

Go to sales order window and create a new record for the "credit" business partner.
Enter 10 units of Agua sin Gas.
Book the order.
Press Add Payment button, and enter 10€. Press Done

Launch the Receivables Aging Schedule report for "Región Norte" organization. Leave the default filters.
Ensure the "credit" business partner has 10€ of credit, and the balance is -1.49€

Go to sales invoice window and create a new record for the "credit" business partner.
Press Create Lines From Order and select the previous sales order. Press Done.
Complete the invoice.

Launch the Receivables Aging Schedule report for "Región Norte" organization. Leave the default filters.
Ensure the "credit" business partner has 0€ of credit, because we have already consumed it.

Now go to payment in and search for the payment that consumed the first credit payment (it ends with *Z*). Unpost & and reactivate it. Verify the payment is in Awaiting Payment status.

Launch the Receivables Aging Schedule report for "Región Norte" organization. Leave the default filters.
Ensure the "credit" business partner has 10€ of credit.

Now, for all the payments associated to "credit" business partner:
 Go to the associated transaction, unpost it, reactivate it and delete it.
 Go to the payment and reactivate it.

Launch the Receivables Aging Schedule report for "Región Norte" organization. Leave the default filters.
Ensure the "credit" business partner has 0€ of credit.
(0128020)
vmromanos (developer)
2021-05-12 09:35

Performance analysis:
* Before the fix (3m 50s): https://explain.dalibo.com/plan/E1A [^]
* After the fix (46s): https://explain.dalibo.com/plan/MSn [^]
(0128032)
hgbot (developer)
2021-05-12 11:14

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/359 [^]

- Issue History
Date Modified Username Field Change
2021-04-30 12:24 salvador_campanella New Issue
2021-04-30 12:24 salvador_campanella Assigned To => Triage Finance
2021-04-30 12:24 salvador_campanella Modules => Core
2021-04-30 12:24 salvador_campanella Triggers an Emergency Pack => No
2021-04-30 15:59 ahernandezgil Issue Monitored: ahernandezgil
2021-05-03 12:33 vmromanos Note Added: 0127736
2021-05-03 12:33 vmromanos Assigned To Triage Finance => salvador_campanella
2021-05-03 12:33 vmromanos Status new => feedback
2021-05-03 17:46 salvador_campanella Note Added: 0127753
2021-05-03 17:46 salvador_campanella Note View State: public: 127753
2021-05-04 12:15 vmromanos Assigned To salvador_campanella => Triage Finance
2021-05-04 12:15 vmromanos Status feedback => new
2021-05-07 12:13 vmromanos Status new => scheduled
2021-05-07 12:13 vmromanos Assigned To Triage Finance => vmromanos
2021-05-11 18:47 vmromanos Note Added: 0128009
2021-05-12 09:35 vmromanos Note Added: 0128020
2021-05-12 11:14 hgbot Note Added: 0128032


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker