Wednesday, July 28, 2010

Re: Django INNER JOIN

On Jul 28, 2010, at 5:19 PM, kostia wrote:
> Thank you very much Roald,
>
> What is faster:
> projects = Project.objects.filter(favourites__user = request.user)
> or
> select_related('project')
> ?


I think it doesn't matter much, but if one is faster, it should be the
first one. If you only use the Project object, I think you should use
the first form for readability.

Cheers, Roald

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