Thanks for you replies.
But I wonder how real production web sites deal with this problem. The 
problem is that I want to display about 30 topics per page which would 
result in 30+1 queries if implemented naively. If I write the required 
query in raw SQL, it should be faster, but probably not very fast anyway. 
Also I don't know how to cache properly since topics should be ordered by 
most recent posts (that is, if someone posts to topic on third page, this 
topic should become the first one on the first page).

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to