Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #22559 All Revisions ] Back to Issue ]
Summary 0022559: SqlC does execute all queries at compile time, which is not required.
Revision 2016-06-05 16:10 by shuehner
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.

Revision 2016-06-05 16:07 by shuehner
Description SqlC does execute all select queries at compile time when it is processing xsql files.
Technically that is needeed 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 does not implement that.

A prototype patch exist which does use this improvement transparently on postgresl and will remove all execution times for those queries on that db.



Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker