4 ms·
prefetch_related is by far the best feature in this release. Huge improvements in efficiency. :)
by natmaster 15y ago
prefetch_related is by far the best feature in this release. Huge improvements in efficiency. :)
- tocomment 15y agoWhat is that?
- nigma 15y agoQuerySet.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 ...