You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Andrus Adamchik <an...@objectstyle.org> on 2008/05/02 17:34:39 UTC

Prefetching: are we doing it wrong?

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