Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0022559 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
feature request | [Openbravo ERP] A. Platform | minor | have not tried | 2012-12-13 11:07 | 2016-07-05 17:28 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | shuehner | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR16Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 21698df6e4fe | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | PostgreSQL | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | alostale | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0022559: 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 | 0011-pending22559.diff [^] (894 bytes) 2016-06-05 16:11 [Show Content] | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||||||||||||||||
|
Notes | |
(0087004) shuehner (administrator) 2016-06-05 16:21 |
Testing in bigger database: a.) compile.complete.deploy now possible to run without needing to increase build.maxmemory -> before failed a.) Compile.complete.deploy goes 1min faster by avoiding to run slow queries |
(0087328) hgbot (developer) 2016-06-16 10:04 |
Repository: erp/devel/pi Changeset: 21698df6e4fe6e0272f997ba99be1c38bc966ee7 Author: Stefan Hühner <stefan.huehner <at> openbravo.com> Date: Thu Jun 16 10:04:13 2016 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/21698df6e4fe6e0272f997ba99be1c38bc966ee7 [^] fixed issue 22559: 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 --- |
(0087332) alostale (manager) 2016-06-16 10:30 |
code reviewd + tested both in Oracle and PG |
(0087625) hudsonbot (developer) 2016-06-17 19:38 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/0dc7be081b1c [^] Maturity status: Test |
Issue History | |||
Date Modified | Username | Field | Change |
2012-12-13 11:07 | shuehner | New Issue | |
2012-12-13 11:07 | shuehner | Assigned To | => AugustoMauch |
2012-12-13 11:07 | shuehner | Modules | => Core |
2012-12-13 11:07 | shuehner | Triggers an Emergency Pack | => No |
2012-12-13 11:07 | shuehner | Relationship added | related to 0022553 |
2012-12-13 11:09 | shuehner | Relationship added | related to 0020173 |
2016-06-05 16:07 | shuehner | Assigned To | AugustoMauch => platform |
2016-06-05 16:10 | shuehner | Summary | SqlC does execute all queries at compile time, that can be avoid on pgsql (but not on oracle) => SqlC does execute all queries at compile time, which is not required. |
2016-06-05 16:10 | shuehner | Description Updated | View Revisions |
2016-06-05 16:10 | shuehner | Tag Attached: Performance | |
2016-06-05 16:11 | shuehner | File Added: 0011-pending22559.diff | |
2016-06-05 16:21 | shuehner | Note Added: 0087004 | |
2016-06-16 10:04 | hgbot | Checkin | |
2016-06-16 10:04 | hgbot | Note Added: 0087328 | |
2016-06-16 10:04 | hgbot | Status | new => resolved |
2016-06-16 10:04 | hgbot | Resolution | open => fixed |
2016-06-16 10:04 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/21698df6e4fe6e0272f997ba99be1c38bc966ee7 [^] |
2016-06-16 10:05 | alostale | Assigned To | platform => shuehner |
2016-06-16 10:30 | alostale | Review Assigned To | => alostale |
2016-06-16 10:30 | alostale | Note Added: 0087332 | |
2016-06-16 10:30 | alostale | Status | resolved => closed |
2016-06-16 10:30 | alostale | Fixed in Version | => 3.0PR16Q3 |
2016-06-17 19:38 | hudsonbot | Checkin | |
2016-06-17 19:38 | hudsonbot | Note Added: 0087625 | |
2016-07-05 17:28 | Orekaria | Status | closed => new |
2016-07-05 17:28 | Orekaria | Resolution | fixed => open |
2016-07-05 17:28 | Orekaria | Fixed in Version | 3.0PR16Q3 => |
2016-07-05 17:28 | Orekaria | Status | new => scheduled |
2016-07-05 17:28 | Orekaria | Status | scheduled => resolved |
2016-07-05 17:28 | Orekaria | Resolution | open => fixed |
2016-07-05 17:28 | Orekaria | Status | resolved => closed |
2016-07-05 17:28 | Orekaria | Fixed in Version | => 3.0PR16Q3 |
2016-07-26 12:36 | shuehner | Relationship replaced | has duplicate 0020173 |
Copyright © 2000 - 2009 MantisBT Group |