OpenJPA
  1. OpenJPA
  2. OPENJPA-1493

Performance improvement in SelectImpl.getTableIndex() for JPQL without subselect

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-beta
    • Fix Version/s: 2.0.0-beta2
    • Component/s: query
    • Labels:
      None

      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.

        Activity

        Donald Woods made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Donald Woods made changes -
        Fix Version/s 2.0.0-beta2 [ 12314802 ]
        Fix Version/s 2.0.0 [ 12314019 ]
        Affects Version/s 2.0.0-beta [ 12314149 ]
        Affects Version/s 2.0.0 [ 12314019 ]
        Affects Version/s 2.0.1 [ 12314532 ]
        Affects Version/s 2.1.0 [ 12314542 ]
        Catalina Wei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.0 [ 12314019 ]
        Resolution Fixed [ 1 ]
        Fay Wang made changes -
        Attachment OPENJPA-1493.patch [ 12434790 ]
        Catalina Wei made changes -
        Field Original Value New Value
        Affects Version/s 2.0.0 [ 12314019 ]
        Affects Version/s 2.0.1 [ 12314532 ]
        Affects Version/s 2.1.0 [ 12314542 ]
        Description 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.
        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.
        Catalina Wei created issue -

          People

          • Assignee:
            Catalina Wei
            Reporter:
            Catalina Wei
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development