批量放()限制 [英] Batch put() Limits

查看:92
本文介绍了批量放()限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有批处理更新现有记录的硬限制或性能降级限制?我有一个任务队列进程,其中处理了数千个现有记录。在过程循环结束时,对于所有记录,索引的BooleanProperty从False更改为True。每次执行5000条记录会产生什么结果,而嵌套批处理会导致10次迭代更新每次500次? TIA -stevep

Is there either a hard-limit, or a performance-degration limit for batch puts updating existing records? I have a task queue process where several thousand existing records are processed. At the end of the process loop, a BooleanProperty that is indexed is changed from False to True for all the records. Are there consequences to doing 5,000 records at a time versus nesting the batch put such that 10 iterations of updates are done 500 at a time 10? TIA -stevep

推荐答案

批处理API将根据需要来处理大量请求,所以您不需要做你自己。该库管理限制,例如服务呼叫的总大小和可以放入单个呼叫的实体的数量,并对服务进行适当的呼叫次数。 (根据库代码,这似乎是1兆字节,每次拨打电话500个实体,但您的应用程序不需要知道这一点,而这些可能会改变。)分割put()调用没有任何优势,而您如果您尝试,可能会意外地发出更多的服务电话。

The batching API will take care of splitting up large requests as needed, so you don't need to do that yourself. The library manages limits such as the total size of a service call and the number of entities that can be put in a single call, and makes the appropriate number of calls to the service. (According to the library code, this appears to be 1 megabyte and 500 entities per put call, but your app doesn't need to know that, and these might change.) There's no advantage to splitting your put() calls, and you might accidentally make more service calls than necessary if you try.

这篇关于批量放()限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆