The main difference I find in .get_by_key_name() is the CPU overhead.. not
the time it takes.  So .. you should also be benchmarking API CPU time

On Wed, Feb 10, 2010 at 11:47 AM, Waldemar Kornewald
<[email protected]>wrote:

> Hi,
> were there any optimizations to the datastore lately? We did a few
> Model.get_by_key_name vs Query.fetch() benchmarks (code is attached)
> and it looks like the difference is minimal for individual
> gets/fetches and practically non-existent for batch-gets vs
> batch-fetch for the same entities.
>
> Here we do 1000 individual get()s:
> http://kornewald.appspot.com/get
>
> Here we do 1000 individual fetch()es for the same entities:
> http://kornewald.appspot.com/fetch
>
> Here we do four batch-get()s of 250 entities each:
> http://kornewald.appspot.com/batchget
>
> Here we do four batch-fetch()es for 250 entities each:
> http://kornewald.appspot.com/batchfetch
>
> The number returned is the time needed for retrieving the entities, so
> the first two basically show the time per single get()/fetch().
>
> Is there anything wrong with the benchmark code?
>
> Our previous benchmarks showed a much more significant difference (3x
> slower fetch()). Now it's merely a 30% difference and the few
> milliseconds can hardly be noticed by the end-user.
>
> Can we stop designing models like crazy around key names because there
> is hardly any benefit in the added complexity or inconvenience in most
> cases (e.g., not being able to change the key name afterwards)?
>
> It looks like the only case where batch-get()s are useful is when you
> can't formulate a single fetch() for the same kind of query.
>
> Bye,
> Waldemar
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine%[email protected]>
> .
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to