开发者

db.get() vs db.get_by_key_name() performance (GAE BIgtable/Datastore)

开发者 https://www.devze.com 2023-01-10 20:51 出处:网络
How d开发者_如何学编程oes the performance of db.get() compare with that of db.get_by_key_name()?get_by_key_name must compute the keys based on app, model, name and parent, so it should consume a (tiny

How d开发者_如何学编程oes the performance of db.get() compare with that of db.get_by_key_name()?


get_by_key_name must compute the keys based on app, model, name and parent, so it should consume a (tiny but not null) amount of CPU more than db.get, which needs no computation. However I doubt you can measure the difference in elapsed time, since the fetching from storage will vastly dominate in both cases.


For all intents and purposes they are equivalent.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号