Google应用引擎chunkSize& prefetchSize - 我可以在哪里阅读它的详细信息? [英] google app engine chunkSize & prefetchSize - where can I read details on it?

查看:176
本文介绍了Google应用引擎chunkSize& prefetchSize - 我可以在哪里阅读它的详细信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有关于这两项总和的信息: chunkSize


设置块大小。请阅读javadoc类,了解如何使用块大小的解释


prefetchSize


设置要预取的实体数量。


试过查看 java文档,然后在源代码。根本没有任何信息!我的意思是,关于这两者的实际含义的信息。

 prefetchSize或多或少清楚 - 运行查询时获取多少实体。

如果我的理解是正确的,例如,如果我将查询的限制设置为1000,并将prefetchSize设置为1000,则它将一次全部读取到内存。



那么chunkSize呢?这是在字节大小?实体数量?



低/高数字的影响是什么,设置为这两个?

解决方案

您链接的页面顶部显示:


 prefetchSize是第一个检索结果的数量调用
数据存储。

chunkSize决定PreparedQuery.asIterator(FetchOptions)和Iterable $ b返回的Iterator
的内部分块策略$ b由PreparedQuery.asIterable(FetchOptions)返回。

chunkSize 的s诚然,描述有点模糊。它指定在后续数据存储请求上获取的结果数量(在第一个 prefetchSize 结果已被占用之后)。


All the info regarding these two sums up to:

chunkSize

Sets the chunk size. Please read the class javadoc for an explanation of how chunk size is used.

prefetchSize

Sets the number of entities to prefetch.

Tried looking at the java docs, and at the source code in the SVN. No info at all! I mean, info regarding the actual implication of these two.

Well, prefetchSize is more or less clear - how many entities are fetched when running th query.
If my understanding is right, for example if I set the query's limit to 1000 and prefetchSize to 1000, it will read them all at once to the memory.

What about chunkSize? Is this in bytes size? Entities amount?

What are the effects of low/high number, set to these two?

解决方案

The top of the page you linked to says:

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) and the Iterable returned by PreparedQuery.asIterable(FetchOptions).

chunkSize's description is a bit vague, admittedly. It specifies the number of results to fetch on subsequent datastore requests (after the first prefetchSize results have been consumed).

这篇关于Google应用引擎chunkSize& prefetchSize - 我可以在哪里阅读它的详细信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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