Hi Rodrigo.. Indeed, what you said is correct... however, bigtable
internals can use different optimizations/lookup algorithms/key
structure representation for different key types like key ids and key
names (even if their logical structure appears to be identical)...
Please note that I don't say it does, but I just want to make sure
that both kind of keys behave the same in therms of lookup
performance.

On Jun 11, 8:57 pm, Rodrigo Moraes <rodrigo.mor...@gmail.com> wrote:
> 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