You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Catalina Wei (JIRA)" <ji...@apache.org> on 2010/02/03 05:24:19 UTC

[jira] Created: (OPENJPA-1493) Performance improvement in SelectImpl.getTableIndex() for JPQL without subselect

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
            Reporter: Catalina Wei
            Assignee: Catalina Wei


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.

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


[jira] Updated: (OPENJPA-1493) Performance improvement in SelectImpl.getTableIndex() for JPQL without subselect

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods updated OPENJPA-1493:
----------------------------------

    Affects Version/s:     (was: 2.1.0)
                           (was: 2.0.1)
                           (was: 2.0.0)
                       2.0.0-beta
        Fix Version/s:     (was: 2.0.0)
                       2.0.0-beta2

> 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-beta
>            Reporter: Catalina Wei
>            Assignee: Catalina Wei
>             Fix For: 2.0.0-beta2
>
>         Attachments: OPENJPA-1493.patch
>
>
> 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.


[jira] Resolved: (OPENJPA-1493) Performance improvement in SelectImpl.getTableIndex() for JPQL without subselect

Posted by "Catalina Wei (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Catalina Wei resolved OPENJPA-1493.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 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
>             Fix For: 2.0.0
>
>         Attachments: OPENJPA-1493.patch
>
>
> 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.


[jira] Updated: (OPENJPA-1493) Performance improvement in SelectImpl.getTableIndex() for JPQL without subselect

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fay Wang updated OPENJPA-1493:
------------------------------

    Attachment: OPENJPA-1493.patch

Internally OpenJPA will generate a subselect for NotContainsExpression in the where clause. In this situation, the call to findAliasForQuery in the SelectImpl still must be made. 

> 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
>         Attachments: OPENJPA-1493.patch
>
>
> 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.


[jira] Updated: (OPENJPA-1493) Performance improvement in SelectImpl.getTableIndex() for JPQL without subselect

Posted by "Catalina Wei (JIRA)" <ji...@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.