[google-appengine] Re: Model.get_by_id performance

2010-09-16 Thread zygimantas
ok, it makes sense. Thanks.

On Sep 16, 12:44 am, Kenneth goo...@kmacleod.ie 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 zygimantas.berziu...@gmail.com 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 google-appeng...@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.



Re: [google-appengine] Re: Model.get_by_id performance

2010-09-16 Thread Martin Webb
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 zygimantas.berziu...@gmail.com
To: Google App Engine google-appengine@googlegroups.com
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 goo...@kmacleod.ie 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 zygimantas.berziu...@gmail.com 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 google-appeng...@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.


  

-- 
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-appeng...@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.



[google-appengine] Re: Model.get_by_id performance

2010-09-16 Thread zygimantas
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 spydre...@yahoo.co.uk 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 zygimantas.berziu...@gmail.com
 To: Google App Engine google-appengine@googlegroups.com
 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 goo...@kmacleod.ie 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 zygimantas.berziu...@gmail.com 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 google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 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 google-appeng...@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.



[google-appengine] Re: Model.get_by_id performance

2010-09-15 Thread Kenneth
The id is converted to the key before the remote call so it is the
same speed.



On Sep 15, 5:48 pm, zygimantas zygimantas.berziu...@gmail.com 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 google-appeng...@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.



[google-appengine] Re: Model.get_by_id()

2009-03-13 Thread ryan

On Mar 12, 3:56 am, herbie 4whi...@o2.co.uk wrote:

 Is there any performance difference in using Model.get_by_id(id)
 compared to  Model.get(key) ?

nope, no difference.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---