If you call PreparedQuery.asIterator(), you can actually iterate yourself as far as you want (within the deadline, of course). In practice I've found you can rarely iterate through more than a couple thousand entities.
The offset value is limited to 1,000. Basically the datastore is iterating through the result set for you, so they put an arbitrary limit on it. Jeff On Mon, Jan 18, 2010 at 2:18 PM, Paul Jacobs <[email protected]> wrote: > Well, it appears that this cannot be done. Works fine on the > development server but I get this: > > java.lang.IllegalArgumentException: offset may not be above 1000 > > on the live server. See similar results below: > > http://www.mail-archive.com/[email protected]/msg04763.html > > Thoughts? > > On Jan 18, 6:49 am, jd <[email protected]> wrote: >> You can iterate over _more_ than 1000 results. >> >> From the horses mouth (sorry Don): >> >> http://groups.google.com/group/google-appengine-java/browse_thread/th... >> >> On Jan 17, 11:58 pm, Paul Jacobs <[email protected]> wrote: >> >> >> >> > Can I get a quick confirmation? >> >> > The 1000 entity limit for any query works as described when I test. >> >> > But in a quick test, something like: >> >> > for (int i = 0;i < 2000; i += 400) >> > { >> > for (Entity row : >> > pqt.asIterable(FetchOptions.Builder.withLimit >> > (400).offset(i))) { >> >> > // yadda >> >> > } >> >> > } >> >> > seems to work. >> >> > I haven't benchmarked it: is this slow on subsequent increments of the >> > offset? >> >> > Any comments appreciated. > > -- > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > > >
-- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
