Ok, just to be clear, I found this about 'offset' in the documentation: "The query has performance characteristics that correspond linearly with the offset amount plus the limit."
If I understand it correctly, the more entries I skip the more time consuming it will be. I guess Paginator simply uses 'offset', that's why it's slow. On 22 Ășn, 23:31, Chris Copeland <ch...@cope360.com> wrote: > Django's Paginator is not going to be efficient on GAE and is definitely not > going to scale. > > GAE provides cursors which are a very efficient way to page through query > results:http://code.google.com/appengine/docs/python/datastore/queries.html#Q... > > On Tue, Feb 22, 2011 at 3:57 PM, tobik <tobiaspoto...@gmail.com> wrote: > > I built a page using Django's Paginator which displays a simple table > > with 20 items from around 1000 total stored in database. I don't know > > how the Paginator works from the inside, but according to the > > appstats, it makes two queries (first counts items, second selects > > given page) and each one of them takes around 130ms of cpu time. Is it > > a normal value? The truth is that the page loads noticeably slower > > than a page without any queries. And I also counted, that with 6.5 cpu > > hours limit I can afford around 3000 such queries every day which is a > > quite small number. And it's only 1000 entries in the database. > > > So far I've been using PHP+MySQL and I am used to that such simple > > queries are really fast, even on poor free hostings. I tried to apply > > caching on every single page generated by Paginator and it naturally > > reduced the loading time to minimum. So is it the right approach to > > AppEngine? Cache everything as much as possible? > > > -- > > 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. > > -- 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.