GAE / J低级API:FetchOptions用法 [英] GAE/J Low-level API: FetchOptions usage

查看:127
本文介绍了GAE / J低级API:FetchOptions用法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于FetchOptions withLimit,prefetchSize和chunkSize,我应该知道些什么? 文档比如说:
$ b


prefetchSize是第一次调用
数据存储时检索到的结果
的数量。 / b>

chunkSize决定
返回的Iterator
的内部
分块策略PreparedQuery.asIterator(FetchOptions)

...

prefetchSize和chunkSize对PreparedQuery的结果没有
影响,
而只是PreparedQuery性能

我不太确定如何在愤怒中使用它。不同选项的性能影响是什么?你如何改变性能的任何例子都可以提高性能?解决方案

设置更大的chunkSize / prefetchSize可以提高迭代的性能结果集,但它也会增加延迟。因此,当您知道您要迭代大型结果集时,更大的值应该会更好。


What should I know about FetchOptions withLimit, prefetchSize and chunkSize? The docs say the following:

prefetchSize is the number of results retrieved on the first call to the datastore.

chunkSize determines the internal chunking strategy of the Iterator returned by PreparedQuery.asIterator(FetchOptions)

...

prefetchSize and chunkSize have no impact on the result of the PreparedQuery, but rather only the performance of the PreparedQuery.

I'm not too sure how to use that in anger. What are the performance implications of different options? Any examples of how changes you've made have improved performance?

解决方案

Setting bigger chunkSize/prefetchSize will improve performance of iteration over big result sets, but it also will increase latency. So bigger values should work better when you know that you are going to iterate over big result set.

这篇关于GAE / J低级API:FetchOptions用法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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