On Mar 23, 12:59 pm, Javier Guerra Giraldez <jav...@guerrag.com>
wrote:
> On Wed, Mar 23, 2011 at 12:56 PM, Javier Guerra Giraldez
>
> <jav...@guerrag.com> wrote:
> > in this case the problem arises because of the big mismatch between
> > the forums_forum table (just 15 records) and the forums_topic table
> > (12k records)  that, and the need to sort by a field on another
> > (bigger) table: forums_post.created_date
>
> PS:  i concur that 7secs for 12k records is pretty bad; definitely
> it's doing the sort on disk and seems to have be using a badly chosen
> set of memory parameters.  still, optimizing the RAM usage for a bad
> case is a last resort.  I'd first be sure that it's not possible to
> optimize the query and _only_then_ try to optimize RAM layout to
> soften the hit

Yes, I think it is spilling out onto the disk. In my Munin graphs I
can definitely see a lot more IOStat activity since this query went
live.

BN

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to