On Thu, Jun 11, 2009 at 2:19 PM, cryb wrote:
> Is there an official position / benchmark about what type of keys
> issue the best performance as for queries?
> Are key ids (long) being looked up faster than key names (string) -
> assuming that both have comparable sizes in bytes?

There's no difference. Both key_name's and id's are used internally to
build a Key from path, which is then used to get the entity. So, when
you do Model.get_by_id(1) or Model.get_by_key_name('a'), you're
actually doing Model.get(Key.from_path('Model', 1)) or
Model.get(Key.from_path('Model', 'a')) - essentially the same thing.

-- rodrigo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to