S
S
stahon2013-06-03 14:45:57
Google Workspace
stahon, 2013-06-03 14:45:57

Question about GAE quota rules

I'm interested in the "Datastore Write Operations" and "Datastore Read Operations" fields.
For example, I have a record (entity) containing 10 fields. When reading it from the database, changing each field and then writing it back to the database, how will transactions be taken into account? Like one or like ten? Does it make sense to combine fields into, say, dictionaries or lists?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
avalak, 2013-06-03
@avalak

Resource Billing Rates
Calculation rules in the "Costs for Datastore Calls" table

F
fishbone, 2013-06-04
@fishbone

This is not obvious, but for example in Python any operation on the db.Model entity is considered a read/write operation:

employee = Employee()
emplee.name = "John Smoth" # - операция записи
print emploee.name # - операция чтения

I was unpleasantly surprised when the very first iteration of the background task gobbled up the entire free quota. I had to actively use Memcache and data serialization in Blob fields. It was possible to optimize the use of the quota a hundred times.

Y
yurtaev, 2013-06-04
@yurtaev

After put()there will be one operation + n, where nthe number of indexes affected by this change. I highly recommend using ndbmodels from the very beginning for which you can set up transparent caching out of the box, monitor indexes because GAE builds an index for all fields, which leads to situations where the index is an order of magnitude larger than the data in the database (exclude all fields for which there are no you need to search), and wherever it is possible to use asynchronous calls to the API (not only to the database), although this will not always reduce the number of calls to the database, it will greatly save CPU time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question