Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 29326 invoked from network); 3 Feb 2010 04:53:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Feb 2010 04:53:43 -0000 Received: (qmail 65889 invoked by uid 500); 3 Feb 2010 04:53:43 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 65788 invoked by uid 500); 3 Feb 2010 04:53:43 -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 65778 invoked by uid 99); 3 Feb 2010 04:53:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Feb 2010 04:53:42 +0000 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; Wed, 03 Feb 2010 04:53:40 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B375129A0012 for ; Tue, 2 Feb 2010 20:53:18 -0800 (PST) Message-ID: <358883271.47381265172798720.JavaMail.jira@brutus.apache.org> Date: Wed, 3 Feb 2010 04:53:18 +0000 (UTC) From: "Catalina Wei (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-1493) Performance improvement in SelectImpl.getTableIndex() for JPQL without subselect In-Reply-To: <968376449.47241265171059081.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Catalina Wei updated OPENJPA-1493: ---------------------------------- Description: OPENJPA-1185 introduced query context for table alias resolution that improved JPQL subquery processing. However, JPQL queries without subselect pay performance penalty because of the alias resolution by query context. In fact, if JPQL or QueryExpression do not contain subselect, then the table alias resolution can be simplified. This can be done by checking if a SelectImpl is involved in a subquery: If SelectImpl is not a subquery (it has no parent) or SelectImpl does not have any subselects, then the alias resolution by query context can be by-passed. was: OPENJPA-1185 introduced query context that fixes JPQL subquery problems. JPQL queries without subselect pay some performance penalty because of the alias resolution by query context This can be avoided with a simple test which checks to see if the SelectImpl is involved in a subquery. If SelectImpl is not a subquery (it has a parent) or SelectImpl does not have any subselects, then the alias resolution by query context can be by-passed. Affects Version/s: 2.1.0 2.0.1 2.0.0 > Performance improvement in SelectImpl.getTableIndex() for JPQL without subselect > -------------------------------------------------------------------------------- > > Key: OPENJPA-1493 > URL: https://issues.apache.org/jira/browse/OPENJPA-1493 > Project: OpenJPA > Issue Type: Improvement > Components: query > Affects Versions: 2.0.0, 2.0.1, 2.1.0 > Reporter: Catalina Wei > Assignee: Catalina Wei > > OPENJPA-1185 introduced query context for table alias resolution that improved JPQL subquery processing. > However, JPQL queries without subselect pay performance penalty because of the alias resolution by query context. In fact, if JPQL or QueryExpression do not contain subselect, then the table alias resolution can be simplified. > This can be done by checking if a SelectImpl is involved in a subquery: > If SelectImpl is not a subquery (it has no parent) or SelectImpl does not have any subselects, then the alias resolution by query context can be by-passed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.