diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/querysets.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 9736d94838..6f2cad3464 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -821,6 +821,12 @@ 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 +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 +profile for your use case! + extra ~~~~~ |
