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 <paul.r.jac...@gmail.com> 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/google-appengine-java@googlegroups.com/msg04763.html
>
> Thoughts?
>
> On Jan 18, 6:49 am, jd <jdpatter...@gmail.com> 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 <paul.r.jac...@gmail.com> 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 google-appengine-j...@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.
>
>
>
>
-- 
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-j...@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.


Reply via email to