Effective request strategy: keys only for request + memcache in appengine?

I am currently caching all my objects in my appengine datastore using a key in memcache.

Is it more efficient for me to do all my queries as KEY ONLY queries and then get the actual objects from memcache? Obviously, the package runs with objects that are not in the cache. In general, this is more efficient than a simple query from the data store that returns the entire object.

+4
source share
3 answers

Doing this may be a little cheaper, but since you may have to extract at least one entity that is not in memcache, you will not save much time with this approach. A much better solution is to save the query result to memcache so that you can get the result with a single memcache access.

+4
source

Yes. It is faster and cheaper.

http://code.google.com/appengine/kb/postpreviewpricing.html#operations_charged_for

  • Read operations (Query, Entity Fetch) will cost $ 0.07 per 100 thousand operations.
  • Small operations (key selection, distribution of identifiers) will cost $ 0.01 per 100 thousand operations.
+4
source

Yes, key-only queries are cheaper because they should only read from the index.

If you save objects in memcache, serialize them first in protobufs .

+2
source

All Articles