Hi all,

I have a pretty simple model with a person object that has a to-many
relationship to addresses. There are about ~30,000 people in the DB. I am
trying to find people who have addresses that have a specific postal code.

My first attempt at writing the qualifier is horribly slow:

EOQualifier zipQual = ERXQ.startsWith(Person.ADDRESSES.append(Address.
POSTAL_CODE).key(), _zipCode);

I created a D2W project and it can do something similar very in a very
performant fashion right out of the box, so I know there isn't a problem
with my DB (indexes, etc.). I am trying to find what the qualifier is that
the query page uses. I can see that the SQL generated is quite a bit
different than my qualifier. My qualifier causes a SELECT to happen on
every row, whereas the D2W qualifier only runs a single SELECT.

Can anyone help me with a more efficient qualifier to find people across
the to-many relationship? Or can someone point me to the D2W code that
builds the qualifier on the query page?

Thanks,

Joe
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to