On one of my models, the admin choice_list page is taking minutes to
load, which makes it somewhat broken.
The table has about 2M rows and about 2.6GB in size, on InnoDB/MySQL.
As far as I can tell, what's breaking things is the paginator code
that is doing a SELECT COUNT(*) which is known to be glacially slow on
InnoDB with certain types of table.
Is there any way to suppress the pagination and/or change it so that
it doesn't do the queryset.count()?
I've tried adding a separate index on the primary key as suggested
here: http://forums.mysql.com/read.php?22,90945,91110#msg-91110 which
improves things - from > 10 minutes to 134s - but not enough.
It seems this should bite anyone using admin with large tables on
InnoDB or Postgres, so perhaps this is a bug?
Cheers,
Malcolm
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment