As I understand, the fastest way is to get by Key because no conversions are needed. Model.get_by_id should be "almost" the same, because ID+Kind+Path will be converted to Key before querying database. But this operation maybe is too cheap comparing to database seek. Model.get_by_key_name should be the same as Model.get_by_id, because it is the same conversion: Key_name+Kind+Path = Key.
On Sep 16, 11:38 pm, Martin Webb <[email protected]> wrote: > Is get_by_key_name as fast as key? or is that slower. What is the best method > is > the difference marginal? > > Regards > > ________________________________ > From: zygimantas <[email protected]> > To: Google App Engine <[email protected]> > Sent: Thu, 16 September, 2010 21:25:09 > Subject: [google-appengine] Re: Model.get_by_id performance > > ok, it makes sense. Thanks. > > On Sep 16, 12:44 am, Kenneth <[email protected]> wrote: > > > > > > > The id is converted to the key before the remote call so it is the > > same speed. > > > On Sep 15, 5:48 pm, zygimantas <[email protected]> wrote: > > > > Hello, > > > > As we know, getting entity by the key is extremely fast. But what's > > > about getting entity by ID (using Model.get_by_id)? > > > As I understand, ID should be indexed separately, and getting by ID > > > should be slower than getting by Key, right? > > > > And this one is related - are there any drawbacks of using ID's on > > > client side if we only care about uniqueness of entity between > > > entities of the same Kind? > > > > Thank you in advance. > > -- > 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 > athttp://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.
