What's faster Model.get(keys) or Model.get_by_id(ids, parent=None)
I'm wondering is there a d开发者_JAVA技巧ifference in terms of computing cost for the Model.get(keys) and Model.get_by_id(ids, parent=None) methods?
Is there a server side computing advantage of using numeric id's over encoded string keys, or other way around? How big is the difference?
PS. Sorry if it's a dupe. I'm sure I read an article about it, but I cannot find it now.
No. Model.get_by_id and Model.get are both simply syntactic sugar for db.get(). There's no substantial difference between passing in encoded string keys or numeric IDs, but your users may find one more friendly than the other if you're passing them around in URLs.
精彩评论