Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0004038Openbravo ERPI. Performancepublic2008-06-18 11:182009-10-22 11:21
jaimetorre 
shuehner 
lowminorsometimes
closedfixed 
5
2.40 
 
Core
No
0004038: Slow compilation in sqlC part due to high amount of data
When compiling, sqlC executes each query to verify the sql syntax. However, if the select returns a big amount of data, sqlC takes very long to respond.

sqlC execution time should not depend on the amount of data in the database. Data is not even needed to check the correction of the sql. In order to avoid this issue, an impossilbe condition (e.g., 1=2) should be added to the sql query before testing it.
No tags attached.
depends on backport 00049642.40MP11 closed shuehner Slow compilation in sqlC part due to high amount of data 
depends on defect 0010318 closed shuehner Big performance issue on PostgreSQL with large table data 
depends on defect 0010588 closed shuehner CreateFromMultiple_Receipt_data.xsql has optional filter on M_LOCATOR.M_LOCATOR_TYPE_ID which was removed in 2.3x -> 2.40 
depends on defect 0010589 closed shuehner CreateAccountingReport process misses some to_date calls and has extra, wrong to_number for c_acctschema_id 
depends on defect 0010592 closed shuehner Account_data.xsql (Account selector) has syntax error in optional parameter of countRows query 
depends on defect 0010593 closed shuehner ReferencedLink_data.xsql misses to_number call in filter of an optional parameter 
depends on backport 0010596 closed shuehner TaxRegister_data.xsql misses a to_number call in a optional parameter 
depends on defect 0010597 closed shuehner WindowTree_data.xsql has sql errror in optional parameter (uses ar table alias which is not defined in from clause) 
related to design defect 0022553 new AugustoMauch sqlc.queryExecutionStrategy=optimized not applied in modules 
Issue History
2008-06-18 11:18jaimetorreNew Issue
2008-06-18 11:18jaimetorreAssigned To => cromero
2008-06-18 11:18jaimetorresf_bug_id0 => 1996841
2008-06-18 12:11jpabloaeNote Added: 0007826
2008-06-18 14:50cromeroStatusnew => scheduled
2008-06-18 14:50cromeroAssigned Tocromero => marvintm
2008-06-24 09:02jpabloaeNote Added: 0007970
2008-11-05 12:01cromeroAssigned Tomarvintm => shuehner
2008-11-05 12:01cromeroPrioritynormal => low
2008-11-05 12:01cromeroCategoryA. Platform (WAD, XmlEngine, SQLC) => I. Performance
2009-01-19 10:31rafarodaversion => 2.40
2009-09-14 19:21shuehnerRelationship addeddepends on 0010318
2009-09-14 19:26shuehnerRelationship addeddepends on 0010588
2009-09-14 19:36shuehnerRelationship addeddepends on 0010589
2009-09-14 20:21shuehnerRelationship addeddepends on 0010592
2009-09-14 20:32shuehnerRelationship addeddepends on 0010593
2009-09-14 20:51shuehnerRelationship addeddepends on 0010596
2009-09-14 21:01shuehnerRelationship addeddepends on 0010597
2009-10-13 10:19hgbotCheckin
2009-10-13 10:19hgbotNote Added: 0020964
2009-10-13 10:19hgbotStatusscheduled => resolved
2009-10-13 10:19hgbotResolutionopen => fixed
2009-10-13 10:19hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/98441eb8254257a1db8f4334072719c16caf3f99 [^]
2009-10-22 11:21plujanStatusresolved => closed
2012-12-13 10:12alostaleRelationship addedrelated to 0022553

Notes
(0007826)
jpabloae   
2008-06-18 12:11   
After some tests, I can say it is also slower in the Wad window compilation.
(0007970)
jpabloae   
2008-06-24 09:02   
The slow WAD window compilation has been solved in r5319:
"Fixed problem with PostgreSQL prescript".
But not the slower sqlC.
(0020964)
hgbot   
2009-10-13 10:19   
Repository: erp/devel/pi
Changeset: 98441eb8254257a1db8f4334072719c16caf3f99
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Tue Oct 13 10:18:40 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/98441eb8254257a1db8f4334072719c16caf3f99 [^]

Fixed 4038: Improve SqlC performance at compile time
- Include optional parameters in SqlC query execution at compile time as this
  leads to better performance in many cases
- This requires the optional parameters to be valid parts of an SQL statement
- New behavior can be configured via new Openbravo.properties setting:
  sqlc.queryExecutionStrategy=traditional,optimized
- Enable optimizedby default (in template and when new setting is missing)
- Enable for processing src/ folder. Disable by default for srcAD/ and modules/
  to not impose stricter requirements on modules.

---
M config/Openbravo.properties.template
M src-core/src/org/openbravo/data/Sqlc.java
M src/build.xml
M src/buildAD.xml
---