openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christiaan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-558) Performance difference between Oracle and Sql server of a factor 2 to 3
Date Fri, 25 Sep 2009 13:30:16 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759525#action_12759525
] 

Christiaan commented on OPENJPA-558:
------------------------------------

Dear Michael,
the performance hit appears to be related to the Oracle driver specifically in the conn.setTranscationIsolation()
call. Appearently the Oracle JDBC driver always calls "ALTER SESSION" 
even if the current connection instance has the same value as provided argument. This has
been fixed in driver version 11.2 (to be released). This issue can be closed.

kind regards,
Christiaan


> Performance difference between Oracle and Sql server of a factor 2 to 3
> -----------------------------------------------------------------------
>
>                 Key: OPENJPA-558
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-558
>             Project: OpenJPA
>          Issue Type: Improvement
>         Environment: Kodo 4.1.4 (sql server 2005, Oracle 10, Oracle 11, ojdbc6 oracle
driver)
>            Reporter: Christiaan
>         Attachments: Oracle Performance.zip
>
>
> I am trying to include support for Oracle in our product. It currently supports ms sql
server. One of the things I noticed is that many of our unit tests perform a factor 2 to 3
slower. I managed to isolate one of the performance bottlenecks which is included in the attached
testcase. The persistent class is basically a 1-to-many relation with itself. The performance
bottleneck is for the code being executed on getParent(). On my machine it gives the following
output:
> 				============Executing test for Oracle=============
> 				There are now 1110 components
> 				Getting 1110 parents took 453ms
> 				Getting 1110 parents with direct SQL took 156ms
> 				============Executing test for SQL=============
> 				There are now 1110 components
> 				Getting 1110 parents took 156ms
> 				Getting 1110 parents with direct SQL took 156ms
> Note, for both sql server and oracle I didn't do any performance tuning. One thing to
note is that Oracle doesn't generate join syntax (which is probably related to issue openjpa-541).
I tried setting fetchConfig.setJoinSyntax(JoinSyntaxes.SYNTAX_SQL92), but this didn't have
any effect. However, executing the "and" syntax version versus the join syntax version with
direct sql gives a time difference of 176 ms vs 156 ms. So this doesn't really explain the
performance difference. I also tried a different oracle driver (datadirect) but this didn't
give much difference either. Could this performance difference be caused by openjpa code?
Did anyone encounter this as well?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message