Hi Eric,

The answer is .... (drumroll) ... zero.

Nick


On 22 September 2010 14:20, esilver <[email protected]> wrote:

> Simple performance question -- assuming I have already retrieved
> object x, a datastore object, how many times will this code query the
> database:
>
> for i in range(0,10):
>   print "%d" % x.key().id()
>
>
> The answer is either zero (because it's already been looked up by
> key), one (the first time it calls key().id()), or 10 (why I would not
> know, that seems really inefficient).
>
> Thanks!
> -Eric
>
> --
> 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