Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0033434 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] A. Platform | minor | have not tried | 2012-12-13 11:07 | 2016-07-06 09:26 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | shuehner | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR16Q2.1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 9ec9da16c06a | ||||
Projection | none | ETA | none | Target Version | 3.0PR16Q2.1 | |||
OS | Any | Database | PostgreSQL | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | alostale | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0033434: SqlC does execute all queries at compile time, which is not required. | |||||||
Description | SqlC does execute all select queries at compile time when it is processing xsql files. Technically that is needed to get the number, names & data-types of the columns in the result as that info is used to generate the fields and data-reading code in the to be generated java file. However the jdbc spec does have a optional method to get that same information for a query without executing it. Postgresql does implement that optional method. Oracle jdbc driver does implement that method only starting with Oracle 11R2 Quoting: https://docs.oracle.com/cd/E18283_01/java.112/e16548/whatsnew.htm#CJACGJHA [^] "" Starting from Oracle Database 11g Release 2 (11.2), JDBC drivers support obtaining the metadata of a SELECT statement without executing the PreparedStatement. This feature works even with the earlier database releases. For more information, please refer to "Interface oracle.jdbc.OraclePreparedStatement". "" So it should be fine to just have the updated jdbc driver even when the database behind is not yet 11R2 (Important as System Requirements only have 11 as min version, we do not require R2) A prototype patch exist which does use this improvement transparently on postgresl and will remove all execution times for those queries on that db. | |||||||
Steps To Reproduce | - | |||||||
Proposed Solution | Review & apply proposed patch to get this compile time improvement on the database where it is possible. | |||||||
Tags | Performance | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0088226) Orekaria (viewer) 2016-07-06 09:24 |
Attached proposed patch |
(0088228) hgbot (developer) 2016-07-06 09:25 |
Repository: erp/backports/3.0PR16Q2.1 Changeset: 9ec9da16c06a04e01ae9d8d345835f3cbf340855 Author: Stefan Hühner <stefan.huehner <at> openbravo.com> Date: Thu Jun 16 10:04:13 2016 +0200 URL: http://code.openbravo.com/erp/backports/3.0PR16Q2.1/rev/9ec9da16c06a04e01ae9d8d345835f3cbf340855 [^] fixed issue 33434: SqlC does execute all queries at compile time SqlC does execute all select queries at compile time when it is processing xsql files. Technically that is needed to get the number, names & data-types of the columns in the result as that info is used to generate the fields and data-reading code in the to be generated java file. However the jdbc spec does have a optional method to get that same information for a query without executing it. As this method is supported in current jdbc drivers for both Oracle and PostgreSQL, now it is used instead of executing the whole queries. --- M src-core/src/org/openbravo/data/Sqlc.java --- |
(0088229) alostale (viewer) 2016-07-06 09:26 |
code reviewd + tested both in Oracle and PG |
![]() |
|||
Date Modified | Username | Field | Change |
2016-07-05 17:28 | Orekaria | Type | feature request => backport |
2016-07-05 17:28 | Orekaria | Target Version | => 3.0PR16Q2.1 |
2016-07-06 09:05 | Orekaria | Assigned To | shuehner => alostale |
2016-07-06 09:09 | alostale | Tag Attached: Performance | |
2016-07-06 09:24 | Orekaria | File Added: FixesIssue22559.patch | |
2016-07-06 09:24 | Orekaria | Note Added: 0088226 | |
2016-07-06 09:25 | hgbot | Checkin | |
2016-07-06 09:25 | hgbot | Note Added: 0088228 | |
2016-07-06 09:25 | hgbot | Status | scheduled => resolved |
2016-07-06 09:25 | hgbot | Resolution | open => fixed |
2016-07-06 09:25 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/21698df6e4fe6e0272f997ba99be1c38bc966ee7 [^] => http://code.openbravo.com/erp/backports/3.0PR16Q2.1/rev/9ec9da16c06a04e01ae9d8d345835f3cbf340855 [^] |
2016-07-06 09:26 | alostale | Assigned To | alostale => shuehner |
2016-07-06 09:26 | alostale | Note Added: 0088229 | |
2016-07-06 09:26 | alostale | Status | resolved => closed |
2016-07-06 09:26 | alostale | Fixed in Version | => 3.0PR16Q2.1 |
2016-07-06 15:35 | Orekaria | File Deleted: FixesIssue22559.patch |
Copyright © 2000 - 2009 MantisBT Group |