From dev-return-7746-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Fri Apr 04 13:50:01 2008 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 24304 invoked from network); 4 Apr 2008 13:50:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Apr 2008 13:50:01 -0000 Received: (qmail 52940 invoked by uid 500); 4 Apr 2008 13:50:01 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 52906 invoked by uid 500); 4 Apr 2008 13:50:01 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 52863 invoked by uid 99); 4 Apr 2008 13:50:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Apr 2008 06:50:01 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Apr 2008 13:49:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DDA67234C0B9 for ; Fri, 4 Apr 2008 06:47:27 -0700 (PDT) Message-ID: <95033238.1207316847895.JavaMail.jira@brutus> Date: Fri, 4 Apr 2008 06:47:27 -0700 (PDT) From: "Michael Dick (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-558) Performance difference between Oracle and Sql server of a factor 2 to 3 In-Reply-To: <589150524.1207307364336.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on 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.