Alfred made this comment, which sheds a lot of light on it: On Sat, Nov 19, 2011 at 8:56 PM, Alfred Fuller < arfuller+appeng...@google.com> wrote:
> if you set chunkSize and not prefetchSize every call will try to return > chuckSize results (even the first call) > if you set prefetchSize and chunkSize, the first call will try to return > prefetchSize results, and every call after that will try to return > chunkSize results. > > it is there mainly for legacy issues (originally the first call never > returned any results, today most queries only ever need a single rpc). > > Here are some use cases: > "I know I need ~300 results but might need a few more." -> > prefetchSize=300, chunkSize=20 > "I want to start a bunch of queries, do something else, then process all > the data." -> prefetchSize=MAX_INT (to maximize the number of results > fetched async in the first batch) > "I want all results" -> chunkSize=MAX_INT (prefetch size is not needed > because the first call will use chunk size) > "I want <limit> results" -> limit=<limit> (chunkSize is automatically > maxed when a limit is set) > > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.