Prefetching: are we doing it wrong?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri May 02 2008 - 11:34:39 EDT

  • Next message: Andrus Adamchik: "JPA 2.0"

    Now that LEFT JOIN is a native part of Cayenne Expression package, I
    wonder if we should get rid of JOINT vs. DISJOINT prefetches and
    always create a left outer join for each prefetch, and add prefetched
    table columns to the query

    The advantages are:

    1. Simplify prefetching from the user perspective (back to Cayenne 1.1
    API)
    2. Instantly free the users from thinking about prefetching caveats
    like CAY-1025, and others.
    3. (Probably) allow us to use the same algorithm for prefetching with
    SelectQuery and EJBQLQuery.

    Am I missing something? Any reason why we don't want to use a
    "universal prefetch" via an outer join, and deprecate the distinction
    between JOINT and DISJOINT?

    Testing the performance should be real easy I think - change the JOINT
    prefetch resolver to resolve as OUTER JOIN and compare it with
    DISJOINT performance - something I may try soon (prerequisite being
    CAY-802 - we want prefetched joins to be separate from the qualifier
    joins).

    Andrus



    This archive was generated by hypermail 2.0.0 : Fri May 02 2008 - 11:35:11 EDT