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 very busy site.
>
> Should I be concerned about this? What are your thoughs?

No, because the ObjectPaginator does only two queries: one is a COUNT
to determine whether the specific page of the Paginator being request
is valid (and to fill the "hits" variable), the other retrieves only
the specific objects for the particular page.

If you're worried about "all()" returning millions of objects, you
should read the documentation more carefully to see when that's turned
into a database query and how -- I strongly suspect that you skipped
over a very important part:

http://www.djangoproject.com/documentation/db-api/#querysets-are-lazy


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to