[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-817) Oracle

Eric Kershner (JIRA) noreply at atlassian.com
Tue Nov 14 08:40:05 EST 2006


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

Eric Kershner commented on HBX-817:
-----------------------------------

As stated in the java file comments, an additional optimization would be to create the PreparedStatments on demand to avoid instantiating and preparing 24 statements, but most Oracle installs should easily be able to handle 24 concurrent prepared statments. Let me know if you would like this additional optimization, but it is probably not necessary and would clutter the code up more than it already is. Also, I forgot to remove Java5 annotations (SuppressWarnings and Override) before uploading.

> Oracle
> ------
>
>          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
>  Attachments: OracleMetaDataDialect.java
>
> 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