Thread:
 But a SELECT to check presence is just inefficient... 
 wren337   11 Sep 2007, 16:35 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: wren337 (11 Sep 2007, 16:35) Replies: 0, Views: 3280
Subject: But a SELECT to check presence is just inefficient beca...
> But a SELECT to check presence is just inefficient because the same
> SELECT may not just check presence, but load entire object. So lazy
> loading goes away.

This is hugely wrong.  Imagine a table with a FK and a 20M blob of data
in each row.  Lazy loading the blob when displaying a list of rows for
example is useful, even if you have to select the PK column to find out
the rows exist.  Lazy loading has more uses than avoiding the SQL
execution.  In this case avoiding the memory overhead of creating
perhaps hundreds of M of data in memory when it's not needed.
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]