|
@@ -802,7 +802,7 @@ This has a similar purpose to ``select_related``, in that both are designed to
|
|
|
stop the deluge of database queries that is caused by accessing related objects,
|
|
|
but the strategy is quite different.
|
|
|
|
|
|
-``select_related`` works by creating a SQL join and including the fields of the
|
|
|
+``select_related`` works by creating an SQL join and including the fields of the
|
|
|
related object in the ``SELECT`` statement. For this reason, ``select_related``
|
|
|
gets the related objects in the same database query. However, to avoid the much
|
|
|
larger result set that would result from joining across a 'many' relationship,
|
|
@@ -932,7 +932,7 @@ referenced is needed, rather than one query for all the items. There could be
|
|
|
additional queries on the ``ContentType`` table if the relevant rows have not
|
|
|
already been fetched.
|
|
|
|
|
|
-``prefetch_related`` in most cases will be implemented using a SQL query that
|
|
|
+``prefetch_related`` in most cases will be implemented using an SQL query that
|
|
|
uses the 'IN' operator. This means that for a large ``QuerySet`` a large 'IN' clause
|
|
|
could be generated, which, depending on the database, might have performance
|
|
|
problems of its own when it comes to parsing or executing the SQL query. Always
|