Google app engine excessive small datastore operations?

Definitely use appstats as Drew suggests; regardless of what library you're using, it will tell you what operations your handlers are doing. The most likely culprits are keys-only queries and count operations.

Spot on here, I have to do a regular sync operation, and I had been getting a total user count on each sync. So I am caching that now, and I can see the difference. Cheers!

– Theblacknight Nov 12 at 23:10.

My advice would be to use AppStats (Python / Java) to profile your traffic and figure out which handler is generating the most datastore ops. If you post the code here we can potentially suggest optimizations.

I know where most of my traffic is going, and I am using 'Siena', a java library that works with GAE. I will go through my code, and try pick out snippets that might be useful. – Theblacknight Nov 11 at 20:22 AppStats is set up, will update my original post when I have more info.Thanks.

– Theblacknight Nov 12 at 14:38.

Don't scan your datastore, use get(key) or get_by_id(id) or get_by_key_name(keyname) as much as you can.

Accessing them will trigger db. Get for each property unless you prefetch them. This would trigger 101 db.

Get requests. Class Foo(db. Model): user = db.

ReferenceProperty(User) foos = Foo.all(). Fetch(100) for f in foos: print f.user.Name # this triggers db. Get(parent=f, key=f.

User).

With the java API I am using I need to manually get each property that is referenced in another entity. Trying to fetch in batches now, to see if that gives me the boost I need. – Theblacknight Nov 12 at 21:19 Check this blog entry I wrote, the prefetching part: bravenewmethod.wordpress.Com/2011/03/23/… – Teemu Ikonen Nov 13 at 9:05.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions