ObjectPaginator Performance in Busy Sites

2007-08-31 Thread Sebastian Macias
I'm building an app that requires pagination. I looked at the official pagination documentation I found at: http://www.djangoproject.com/documentation/models/pagination/ I followed the tutorial and basically: paginator = ObjectPaginator(Article.objects.all(), 5) is where all the "magic" happens.

Re: ObjectPaginator Performance in Busy Sites

2007-08-31 Thread James Bennett
On Aug 31, 9:11 pm, Sebastian Macias <[EMAIL PROTECTED]> wrote: > What I'm concerned about is that Article.objects.all() will return a > query_set with all of the records. If I have millions of records it > means the returned query_set will be huge and I'm affraid performance > will be poor in and

Re: ObjectPaginator Performance in Busy Sites

2007-08-31 Thread Florian Apolloner
There should be no problem at all (taken from the paginator source http://code.djangoproject.com/browser/django/trunk/django/core/paginator.py#L39): An queryset like Category.objects.all() would result in (see above link): >>> from django.db import connection >>> Category.objects.all()[5:10] [, ,