On Tue, Oct 4, 2016 at 5:23 PM, Paul Mazzuca <paul.j.mazz...@gmail.com>
wrote:

> Is there any reason to use an Entity Group in Google Datastore other than
> for enabling transactions?
>

Strong consistency: ancestor queries are strongly consistent. That's a key
semantic difference compared with the eventual consistency of most queries
(though, of course, you do pay for it in othe ways).

And yes, you MAY get some performance benefits due to locality under very
specific circumstances -- see https://cloud.google.com/d
atastore/docs/articles/balancing-strong-and-eventual-consist
ency-with-google-cloud-datastore/#h.3loc7ynqbw6i for MUCH more.



>
> For example, does having entities in the same entity group speed up
> queries?  The situation that I run into often is whether to have X be a
> parent to Y or have X be a property of Y.   Both cases allow for Y to be
> queried given X, but when transactions aren't needed perhaps the entity
> group is not necessary.  I guess another way of stating the question is
> whether or not ancestor queries provide speed up over property based
> queries without ancestors?
>

Not in the general case, but, in specific ones (since, per the URL I
quoted, "entities are sorted and stored by the lexicographical order of the
keys"), it sure might help.

Me, in this case like in many others, I'm partial to benchmarking -- make a
toy app closely simulating your specific use case, implemented both ways,
run a large number of equivalent queries in either way, get the precise
delay numbers and ponder their histograms. I'll take real data over
theoretical considerations any day of the week:-).

Alex


>
> --
> 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 google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/google-appengine/846d1d10-af2c-4c9a-80eb-bf29708017da%40
> googlegroups.com
> <https://groups.google.com/d/msgid/google-appengine/846d1d10-af2c-4c9a-80eb-bf29708017da%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CAE46Be-HGX-rSxOupZpgT2XCCF2u8eUGPk3Abs1ea3WzAd2Bzw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to