[hibernate-issues] [Hibernate-JIRA] Updated: (HBX-817) Use PreparedStatements in OracleMetaDialect

Max Rydahl Andersen (JIRA) noreply at atlassian.com
Tue Nov 28 09:11:04 EST 2006


     [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-817?page=all ]

Max Rydahl Andersen updated HBX-817:
------------------------------------

    Summary: Use PreparedStatements in OracleMetaDialect  (was: Oracle)

> Use PreparedStatements in OracleMetaDialect
> -------------------------------------------
>
>          Key: HBX-817
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-817
>      Project: Hibernate Tools
>         Type: Patch

>   Components: reverse-engineer
>     Versions: 3.2beta8
>  Environment: Hibernate 3.2, Oracle 10g
>     Reporter: Eric Kershner
>      Fix For: 3.2beta9
>  Attachments: OracleMetaDataDialect.java, patch.txt
>
> Original Estimate: 4 hours
>         Remaining: 4 hours
>
> Here is a patch for the OracleMetaDataDialect. The prior version dynamically built the query strings and executed them directly. Oracle cannot perform access path optimization and reuse the queries when performed this way. I changed the dialect to use PreparedStatements instead and increased the mapping generation by 30x. Additionally, I joined a couple more tables to the getTables and getColumns methods to read comments and assign those appropriately in the ResultSetIterator's convertRow methods. This allows access to table and column comments, which is helpful when generating javadoc meta attributes. This was tested on Oracle 10g (10.2.0.1.0) but needs testing on 9i, work estimate reflects the time necessary to test on 9i and run any appropriate unit tests.
> When mapping 420 tables with a 1300 line reveng file:
>   Current OracleMetaDataDialect: 24 min 50 sec
>   JDBCMetaDataDialect: 1 min 50 sec
>   New OracleMetaDataDialect: 51 sec

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list