Skip to content

Glossary: Django Beyond the Basics

select_related

A QuerySet method that fetches a ForeignKey's object in the same query with a SQL JOIN. It fixes the N+1 problem for orders and their products.

Where the book teaches it

Related terms

prefetch_relatedN+1 problem