Hi Mark,
When you use || operator, the query is executed as individual sub-
queries, one for each username == 'xxxxx'. According to the docs,
there can only be a maximum of 30 sub-queries so you would be maxed
out at 30 friends. I can only assume that the datastore would execute
these sub-queries in parallel, but that's only a guess.
Hope this helps,
Stephen


On Jul 27, 11:53 am, Mark <[email protected]> wrote:
> Hi,
>
> I'm interested in knowing how well multiple OR (||) statements would
> operate in a single query. For example, I want to find all friends
> that have recommended a particular product:
>
>    Query query = pm.newQuery(Recommendation.class,
>        "(username == 'turtle' ||
>          username == 'frog' ||
>          username == 'rock') &&
>          productid == '123'");
>
> if a user has 200 friends, and I created a huge string as above, what
> can I expect to happen? Should the query take a very long time to run?
> Can app engine break the query apart and run each part in parallel?
> Even if performance is ok, will I be using a lot of my CPU quota every
> time this is called?
>
> Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to