appengine数据存储查询的成本有多少配额? [英] How much quota does an appengine datastore Query cost?
问题描述
在appengine的帐单和预算资源页面中,它表示成本查询映射到每读取1个实体+ 1个小实体,而查询(仅限于键)映射到每个读取+1个小键每个检索的键。
这对我来说似乎是一个错字。似乎查询仍然需要对返回的每个实体执行完整的获取操作。这个假设是不正确的?我预计查询的成本为每读取一个实体读取1次读取 读取 。
这绝对看起来像一个错字。
cpm_usd看起来像是一种不赞成使用的方式来衡量成本,与以前的定价模型相关联。
$ b
使用最新版本的AppStats( Python SDK 1.7.1 )有一个工具来计算数据存储相关成本。使用交互式操场我很快得到了这些结果:
$ b $ ul
用keys_only = False查询
@ 1ms datastore_v3.RunQuery real = 36ms api = 0ms cost = 770 billed_ops = [DATASTORE_READ:11]
使用keys_only = True
@ 1ms datastore_v3.RunQuery real = 5ms api = 0ms cost = 170 billed_ops = [DATASTORE_READ:1,DATASTORE_SMALL:10]
$ b
(所有成本都显示在micropennies中(1美元等于100便士,1便士等于100万micropennies))
In the appengine Billing and Budgeting Resources page, it says that the cost of a "Query" maps to "1 read + 1 small per entity retrieved", whereas a "Query (keys only)" maps to "1 read + 1 small per key retrieved".
This seems like a typo to me. It would seem that a Query would still need to perform a full "get" operation on each entity returned. Is this assumption incorrect? I would have expected the cost of a "Query" to be "1 read + 1 read per entity retrieved".
This definitely looks like a typo. cpm_usd looks like a deprecated way to measure costs, linked to the previous pricing model.
With a recent version of AppStats (Python SDK 1.7.1) there is a tool to compute datastore related costs. Using the interactive playground I quickly got these results:
Query with keys_only=False
@1ms datastore_v3.RunQuery real=36ms api=0ms cost=770 billed_ops=[DATASTORE_READ:11]
Same Query with keys_only=True
@1ms datastore_v3.RunQuery real=5ms api=0ms cost=170 billed_ops=[DATASTORE_READ:1, DATASTORE_SMALL:10]
(All costs displayed in micropennies (1 dollar equals 100 pennies, 1 penny equals 1 million micropennies))
这篇关于appengine数据存储查询的成本有多少配额?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!