On 1/22/07, Tim Chase <[EMAIL PROTECTED]> wrote:
> Or, alternatively, one could do something like
>
> SELECT c.* FROM camps c INNER JOIN application a ON c.id = a.camp_id
>
> which might also be another way to let the optimizer take a crack
> at doing it well.

Yeah, though AFAIK the 'extra' method on QuerySets can't specify an
inner join, so you're stuck executing the query via the cursor
instead. It's a tradeoff, really; if you need to squeeze every ounce
of optimization out of the DB, go with that. Otherwise, doing the 'id
in' with subselect is probably a little bit easier for the end user of
Django.

-- 
"May the forces of evil become confused on the way to your house."
  -- George Carlin

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