News for hackers. Stuff that matters.
Re:Django 1.11 beta 1 released by rowanseymour on Tuesday February 21, 2017 @04:13AM (#13694352)

    Post.objects.prefetch_related('author__company')
Often I want to avoid joins on big tables but still need to prefetch related fields on the objects I'm fetching. Example above fetches all the authors for the returned post, and then fetches all their companies. That's two additional fetches I don't have to write.
Re:Django 1.11 beta 1 released by ZenoArrow on Tuesday February 21, 2017 @01:32PM (#13698068)
It's also simple to prefetch in SQL. For example, if you wanted to populate a temp table with the results of a select query in SQL Server, this can be a one line change:

http://stackoverflow.com/a/12323794