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

        Hide
        Fay Wang added a comment -

        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.

        Show
        Fay Wang added a comment - 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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development