Django
prefetch_related
Fetches multi-valued relations (ManyToMany, reverse FK) in a second query and joins them in Python.
Why interviewers ask about it
Two queries instead of N+1. Prefetch() lets you filter or order the prefetched set, which is the follow-up question.
Related terms
This term is part of the free Python Full-Stack interview preparation module - browse the full glossary for every definition.