On Mon, 2009-01-19 at 12:27 -0800, sico wrote:
[...]
> I haven't checked but assuming this is going to execute 2 sql commands
> for each row returned by the first query.... not good!!
> Is there a way to tell django/python that I want to retrieve the
> related data from the other 2 models before looping through the
> queryset so it can figure out to do the necessary joins??

Have you looked at select_related()?

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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