Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029646Openbravo ERP09. Financial managementpublic2015-04-21 10:092015-04-28 15:53
ioritzCia 
Triage Omni OMS 
highmajoralways
closedduplicate 
30Ubuntu 14.04
3.0PR15Q1 
3.0PR15Q3 
ioritzCia
Google Chrome
Advanced Payables and Receivables Mngmt
No
0029646: Performance problem in add payment query
There is a query that gets built in Add Paymen functionality that comes from the following hql to be injected:

select @selectClause@
from FIN_Payment_ScheduleDetail as psd
left outer join psd.orderPaymentSchedule as ops
left outer join ops.order as ord @joinClauseOrder@
left outer join ord.businessPartner as ordbp
left outer join ops.fINPaymentPriority as opriority
left outer join ops.finPaymentmethod opsfp
left outer join psd.invoicePaymentSchedule as ips
left outer join ips.invoice as inv @joinClauseInvoice@
left outer join inv.businessPartner as invbp
left outer join ips.fINPaymentPriority as ipriority
left outer join ips.finPaymentmethod as ipsfp
left outer join psd.organization as org
left outer join org.organizationInformationList as oinfo
left outer join psd.paymentDetails as pd
left outer join pd.finPayment as fp
@joinClause@
where @additional_filters@
and @whereClause@
group by @groupByClause@
@havingClause@

You can find attached a part of the postgres log with the resulting query its duration and parameters. In this case took more than 50 seconds.

This is not the usual time for this query in the log, postgres is configured in this instance to log the queries that are slower than 5 sec. An there are 3503 appearances of that query that were slower than 5 sec since 03-02-2015 to 13-04-2015. The usual time the query takes when it appears in the log is from 6s to 10s, which is still slow, but there are times when it takes more.

We have a cloned instance.

Execute the attached query in the database.
Performance
duplicate of defect 0028854 closed umartirena The add details pick&Execute takes long to show data with a big amount of data 
log AddPayment.log (4,339) 2015-04-21 10:09
https://issues.openbravo.com/file_download.php?file_id=8011&type=bug
Issue History
2015-04-21 10:09ioritzCiaNew Issue
2015-04-21 10:09ioritzCiaAssigned To => Triage Finance
2015-04-21 10:09ioritzCiaFile Added: AddPayment.log
2015-04-21 10:09ioritzCiaWeb browser => Google Chrome
2015-04-21 10:09ioritzCiaModules => Advanced Payables and Receivables Mngmt
2015-04-21 10:09ioritzCiaTriggers an Emergency Pack => No
2015-04-21 10:09ioritzCiaTag Attached: Performance
2015-04-21 10:11ioritzCiaWeb browserGoogle Chrome => Google Chrome
2015-04-21 10:11ioritzCiaDescription Updatedbug_revision_view_page.php?rev_id=8312#r8312
2015-04-22 10:15jonalegriaesarteWeb browserGoogle Chrome => Google Chrome
2015-04-22 10:15jonalegriaesarteResolution time => 1432072800
2015-04-22 10:15jonalegriaesarteTarget Version => 3.0PR15Q3
2015-04-22 10:18jonalegriaesarteWeb browserGoogle Chrome => Google Chrome
2015-04-23 10:26ioritzCiaRelationship addedduplicate of 0028854
2015-04-23 10:27ioritzCiaReview Assigned To => ioritzCia
2015-04-23 10:27ioritzCiaStatusnew => closed
2015-04-23 10:27ioritzCiaResolutionopen => duplicate
2015-04-28 15:53shuehnerIssue Monitored: shuehner
2015-04-28 15:53shuehnerIssue End Monitor: shuehner

There are no notes attached to this issue.