honzajde
honzajde

Reputation: 2398

Is there any limit of the entities written in one batch query per entity group (max number/second) in AppEngine DataStore?

I am structuring my datastore 'schema' and I have created root entity that has many child entites. My application will do potentially thousands of writes in the child entities. (The reason for this was some simplicity in terms of transactions - I can save child entities in one transaction - they are all one entity group - but lets forget transactions for now).

I am afraid as my application will grow and there will be many more writes - wouldn't it be betters should I opt for a 'schema' where child entites were root entities thus writing to many entity groups.

  1. Is it different to save batch of different entities that are root entities and the same batch if they all belong to one entity group in terms of performance - writes/second (abstracting from contention and transactions) ?

  2. Besides that, is there differnce in performance if those child entites are of one kind or all different kinds?

Upvotes: 1

Views: 606

Answers (1)

Andrei Volgin
Andrei Volgin

Reputation: 41089

There is a limit:

This approach achieves strong consistency by writing to a single entity group per guestbook, but it also limits changes to the guestbook to no more than 1 write per second (the supported limit for entity groups).

(from Structuring Data for Strong Consistency)

There is no reason to put entities into the same group unless you need transactions. Besides performance considerations, the size of storage data will dramatically increase: a key of a child entity contains a key of every ancestor entity.

Upvotes: 3

Related Questions