> 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. |