How many pages do your users really want to see? Even Google search sets a limit - I think 1000 results. Although the number of results can exceed 1000 the offset is still limited so you would need to filter out results to continue past 1K. That would be slow.

If you really need to return more than 1000 results and access them in forward and backward directions you could sort them by __key__ or some other unique combination and use that as you own "cursor". You could define both ascending and descending indexes on your chosen property(s) to let you iterate in both directions.

On 3 Apr 2010, at 19:32, Arny wrote:

But isn't it getting slower and slower on higher pages, since it
fetches ALL data (according to docs) and discards the offset value?
So Range(0,10) is faster than Range(10000,10) ?

Anyone did some performance tests?
Regards

On Apr 3, 7:49 am, John Patterson <jdpatter...@gmail.com> wrote:
Probably you should set an offset and limit instead for your paging.
I believe cursors are really intended for processing a lot of data off-
line.  Remember there is no longer a 1000 result limit on fetches.

On 3 Apr 2010, at 02:57, Arny wrote:

Hi,

Is there a way to get a cursor to page back to a previous page?
If not, whats the point of paging forward only? I'm not building an
ajax page.

Regards

--
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 
athttp://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-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 .


--
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