On Apr 11, 1:36 pm, Olivier Guilyardi <[EMAIL PROTECTED]> wrote:
> However, watching the MySQL verbose log, I realized that retrieving properties
> as well as their definitions (and enumeration values) to properly display an
> detail view or edition form execute a _lot_ of SQL queries, when this could be
> achieved with one or two joins... I'm afraid it won't scale.

You might look into select_related() to get the properties in one
query, since you know you'll need them every time you access a
category.

http://www.djangoproject.com/documentation/db-api/#select-related

-Gul


--~--~---------~--~----~------------~-------~--~----~
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