2 ms·
QuerySet.prefetch_related lets you fetch related objects in a batch for the whole query set. In other words it does joins in the application. A really nice stuf
by nigma 15y ago
QuerySet.prefetch_related lets you fetch related objects in a batch for the whole query set. In other words it does joins in the application. A really nice stuff. Take a look at docs for more info:
https://docs.djangoproject.com/en/dev/ref/models/querysets/#prefetch-related https://docs.djangoproject.com/en/dev/ref/models/querysets/#...
- tocomment 15y agoWhat's the difference between that and select related? Edit, nevermind I read the link ...