django select_related and prefetch_related

select_related returns a QuerySet that will "follow" foreign-key relationships, performing a single SQL query for all the related objects. prefetch_related returns a QuerySet that will prefetch the specified related objects, performing two queries - one for the original queryset and one for the related objects.