On Thu, Sep 20, 2012 at 1:59 AM, Moises Belchin <moisesbelc...@gmail.com> wrote: > Hi Guido, > > Thanks for your answer. > > We test to use query cursors and we decide don't use them because query > cursors don't work in reverse order if you don't do query orders.
If you have inequalities the order you give must start with the property involved in the inequalities (<, <=, >, >=, !=). > We have queries with many filters and we can't do query orders for this > queries. In this case if we use cursors, the reverse function doesn't work > properly. Did you follow the recipe for paging backwards in the docs? https://developers.google.com/appengine/docs/python/ndb/queries#cursors > We want to know how we must work in this cases without create indexes for > this kind of queries. Can you post your model and query here? (Or mail them privately if you think they're too sensitive.) > Thanks and regards. > Moisés Belchín. > > > > 2012/9/20 Guido van Rossum <gu...@google.com> >> >> On Wednesday, September 19, 2012 8:51:48 AM UTC-7, Moises Belchin wrote: >>> >>> Hi guys, >>> >>> I have this query: >>> >>> q = MyKind.query() >>> regs = q.fetch(offset = 990, limit = 10) // Returns 10 entities. >>> >>> If I press next button on my UI: >>> >>> q = MyKind.query() >>> regs = q.fetch(offset = 1000, limit = 10) // Returns 0 entities . >>> >>> MyKind has 1300 entities. >>> >>> Any thoughts? >>> >>> Thanks and regards. >>> Moisés Belchín. >> >> >> I can confirm this. I believe it is intentional to encourage you to use >> cursors instead of offsets for such queries; internally, you are paying for >> reading all the entities that you are skipping using the offset. >> >> --Guido >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google App Engine" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/google-appengine/-/uNrSdb1M29wJ. >> To post to this group, send email to google-appengine@googlegroups.com. >> To unsubscribe from this group, send email to >> google-appengine+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/google-appengine?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to google-appengine@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. -- --Guido van Rossum (python.org/~guido) -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.