You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Christiaan (JIRA)" <ji...@apache.org> on 2008/04/04 13:09:24 UTC
[jira] Created: (OPENJPA-558) Performance difference between Oracle
and Sql server of a factor 2 to 3
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.
[jira] Commented: (OPENJPA-558) Performance difference between
Oracle and Sql server of a factor 2 to 3
Posted by "Christiaan (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Commented: (OPENJPA-558) Performance difference between
Oracle and Sql server of a factor 2 to 3
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585527#action_12585527 ]
Michael Dick commented on OPENJPA-558:
--------------------------------------
Do you see the same behavior if you use JPA? The attached zip file contains a JDO testcase, which we can't run with OpenJPA. The JDO persistence "persona" is only included with BEA's Kodo.
BEA developers do monitor this forum and may be able to run the provided example, but it might be easier / quicker to fix if you had a JPA program which shows the same behavior.
> 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.
[jira] Updated: (OPENJPA-558) Performance difference between Oracle
and Sql server of a factor 2 to 3
Posted by "Christiaan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christiaan updated OPENJPA-558:
-------------------------------
Attachment: Oracle Performance.zip
> 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.
[jira] Closed: (OPENJPA-558) Performance difference between Oracle
and Sql server of a factor 2 to 3
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods closed OPENJPA-558.
--------------------------------
Resolution: Won't Fix
> 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.