> Dain,
>
> I've read your email on how to use the eager/lazy loading features.  I'm
not
> sure if this is the same thing as danch's <read-ahead> feature.  Your
> eager/lazy loading seems to be focused around LoadEntity, where danch's
> read-ahead happens on the finder call itself.  I really should examine
your
> code(sorry, too lazy at the moment), but eager/lazy loading seems to
> optimize on limiting what field you load from the database, where danch's
> read-ahead deals with when do you read a beans fields.  With read-ahead
> there is no longer n + 1 select calls when doing a finder call then
> subsequently accessing the beans returned by the finder.  Do your
> optimizations take this into account?
>

I have not included the pre-load logic that dan wrote <read-ahead>.  I will
look into this when I write the EJB-QL code.  With read ahead you load all
the rows of the data with one select statement (maybe two...).  The
eager/lazy loading allows you to return a bean to the code with only some of
the data loaded (some of the columns).  This allows you to always load the
most common data and go back to the database when less common data is
accessed. Think of an entity with 500+ columns of data. I've seen it. It is
very common in HealthCare and Finance applications. Most of the time you
only need 20 columns of data, but in CMP 1.x you had to load all 500.  With
abstract accessors in CMP 2.x you only load what you need.

When I write the EJB-QL code, in a couple of weeks, I plan on supporting
eager-loading per query and read-ahead (per dan's example). This will allows
us to delcare which rows and columns to load.

-dain


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to