Openbravo Issue Tracking System - Openbravo ERP
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0033434||Openbravo ERP||A. Platform||public||2012-12-13 11:07||2016-07-06 09:26|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Target Version||3.0PR16Q2.1||Fixed in Version||3.0PR16Q2.1|
|Review Assigned To||alostale|
|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.|
|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||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|