Why do you need so many child objects?
Can you implement it with adding a Parent Reference Property to the
child object and thus remove the need to store the entity group all in
one Bigtable node?
The parent-child objects are needed
1) if you need transactions on them
or
2) if you want to extract the parent key given a child key
Perform a keys_only query on child objects and from these keys get
the set of parent keys of objects that you need to fetch complete.
Brett Slatkin uses this technique in a number of Google IO talks,
the child object has a ListProperty that is used in the keys_only
query.
Most other applications can be implemented without the explicit parent object.
2010/10/26 Charles <cha...@whoischarles.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengi...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
Entity groups refers to a logical group of entities that are
physically stored together; this allows that group of entities to be
updated in a transaction.
If you make entity groups with lots and lots of entities in them your
data can not be sharded across bigtable tablets. That means if you
are try to write 5 entities in that group the writes are done
serially. Fetches will also be less efficient for the same reasons.
You can read all about these topics:
http://code.google.com/appengine/articles/datastore/overview.html
Robert
On Wed, Oct 27, 2010 at 21:40, sodso <sodhiso...@gmail.com> wrote:
> Hi Ikan Lan,
>
> I have seen this on so many discussions here in the forums -
> "A best practice, however, is to keep entity groups as small as
> possible"
>
> As far as I understand it, one Model class should not have too many
> records i.e. one table should not have many records
>
> Isn't this strange ? When we talk of GAE, we talk of scalability but
> if the best practice says to limit ther records to only a few in a
> Model class, what use is the scalability for ? If we store millions fo
> records (for eg- customer records) in one db.Model table, are you
> saying it would really impact the performance.
>
> Please correct me if I am wrong. I am unclear if my app can survive on
> GAE if its working with millions of records in one db.Model table ??
>
> Thanks,
> Sodso
>
>
> On Oct 27, 11:27 pm, "Ikai Lan (Google)" <ikai.l+gro...@google.com>
> wrote:
>> Generally speaking: no. Entity groups will guarantee a stronger chance of
>> data locality, but this should not affect index traversal or batch reads.
>>
>> A best practice, however, is to keep entity groups as small as possible.
>> There aren't many compelling reasons to not use root entities if you don't
>> need transactions, as working with root entities is generally simpler.
>>
>> --
>> Ikai Lan
>> Developer Programs Engineer, Google App Engine
>> Blogger:http://googleappengine.blogspot.com
>> Reddit:http://www.reddit.com/r/appengine
>> Twitter:http://twitter.com/app_engine
>>
>> > 2010/10/26 Charles <char...@whoischarles.com>:
>> > > google-appengi...@googlegroups.com<google-appengine%2Bunsu...@googlegroups.com>
>> > .
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/google-appengine?hl=en.
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups
>> > "Google App Engine" group.
>> > To post to this group, send email to google-a...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > google-appengi...@googlegroups.com<google-appengine%2Bunsu...@googlegroups.com>
2010/10/29 sodso <sodhiso...@gmail.com>:
| ||||||||||||||||||||||
|