Skip to content

Commit

Permalink
Linked to prefetch_related_objects func in DB optimization docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
spookylukey committed Nov 23, 2017
1 parent 93cdd07 commit e283c1a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/topics/db/optimization.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,13 @@ Understand :meth:`~django.db.models.query.QuerySet.select_related` and
:meth:`~django.db.models.query.QuerySet.prefetch_related` thoroughly, and use
them:

* in view code,

* and in :doc:`managers and default managers </topics/db/managers>` where
* in :doc:`managers and default managers </topics/db/managers>` where
appropriate. Be aware when your manager is and is not used; sometimes this is
tricky so don't make assumptions.

* in view code or other layers, possibly making use of
:func:`~django.db.models.prefetch_related_objects` where needed.

Don't retrieve things you don't need
====================================

Expand Down

0 comments on commit e283c1a

Please sign in to comment.