[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] Batch read question: controlling no. of subqueries?
|
I have a question related to...performance, I guess, in a batch read
scenario.
Suppose I have people in my database with, purely for the sake of argument,
zillions of addresses.
I would not of course want any ORM tool to fetch, say, 10,000 people inner-
or outer-joined with their zillions of addresses--the amount of duplicate
data crossing the wire would be crippling.
As I understand it, that's what batch reading is intended to solve.
Now, I understand that you can tell EclipseLink to
http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_(ELUG)#Batch use
subqueries to get the addresses. And I think I understand that the way you
do this is by telling it to use a particular batch size, i.e. get 100
addresses at a time, instead of 1 at a time.
My question is: is there any way to tell EclipseLink to get all the
addresses, using the same filter criteria used on the original person query?
That is, suppose I told EclipseLink to get me all persons whose age is
greater than 50. Is there a way to make it pre-load the Person's addresses
property all at once?
I guess what I'm trying to ask is this: setting the batch size will reduce
the number of subqueries, but that number of subqueries will still depend on
the size of the results. What I want to do is guarantee the number of
subqueries (one, I guess) by simply reusing the filter criteria of the
parent object. Is that possible? Am I making sense? :-)
Thanks in advance for any help.
Best,
Laird
--
View this message in context: http://www.nabble.com/Batch-read-question%3A-controlling-no.-of-subqueries--tp22911746p22911746.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.