mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #17668 - prefetch_related does not work in in_bulk
Thanks to gurets for the report, and akaariai for the initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -871,6 +871,9 @@ 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!
|
||||
|
||||
Note that if you use ``iterator()`` to run the query, ``prefetch_related()``
|
||||
calls will be ignored since these two optimizations do not make sense together.
|
||||
|
||||
extra
|
||||
~~~~~
|
||||
|
||||
@@ -1430,6 +1433,9 @@ performance and a significant reduction in memory.
|
||||
Note that using ``iterator()`` on a ``QuerySet`` which has already been
|
||||
evaluated will force it to evaluate again, repeating the query.
|
||||
|
||||
Also, use of ``iterator()`` causes previous ``prefetch_related()`` calls to be
|
||||
ignored since these two optimizations do not make sense together.
|
||||
|
||||
latest
|
||||
~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user