I wasn't quite sure what Q2.B is trying to do with
"filter(anotherParentKey)" since that won't actually compile, but:

Queries with ancestor() are by default strongly consistent. Even if
they include other filters.

If you explicitly specify eventual consistency on an ancestor() query,
I would expect it to have similar performance to a (inherently
eventually consistent) non-ancestor query. However, you should always
run your own performance tests.

Jeff

On Mon, Mar 17, 2014 at 4:02 AM, Jon Anders Sollien
<[email protected]> wrote:
> Some data loads in my application are depending on being strongly consitent,
> others are not.
>
> In
> https://developers.google.com/appengine/docs/java/datastore/queries#Java_Ancestor_queries
> I read: Setting an ancestor filter allows for strongly consistent queries.
> Queries without an ancestor filter only return eventually consistent
> results.
>
> Lets say I have a class
> MyClass.class {
>     @Parent Key parent;
>     @Index Key anotherParent;
>     @Index String firstName;
> }
>
> Question 1: Does this mean that queries with both ancestor limiter and
> filters are strongly consistent? Example:
> ofy().load().type(MyClass.class).ancestor(parentKey).filter("firstName =
> ",firstName);
>
> Question 2: In some other data loads, performance is more important. Assume
> example "A" and "B". Will "A" have the same performance as "B"?
>
> A.
> ofy().consistency(Consistency.EVENTUAL).load().type(MyClass.class).ancestor(parentKey).filter("firstName
> = ",firstName)
> B.
> ofy().load().type(MyClass.class).filter(anotherParentKey).filter("firstName
> = ",firstName)
>
> Thank you in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/google-appengine.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to