Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

[1.4.X] Fixed #13869 - Warned that QuerySet.iterator() doesn't affect…

… DB driver caching; thanks jtiai for the suggestion.

Backport of 2f722d9 from master
  • Loading branch information...
1 parent 13bbe91 commit 6c1c490f64bb5114570a45a523bec365f89f681d @timgraham timgraham committed
Showing with 10 additions and 0 deletions.
  1. +10 −0 docs/ref/models/querysets.txt
10 docs/ref/models/querysets.txt
@@ -1451,6 +1451,16 @@ 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.
+.. warning::
+ Some Python database drivers like ``psycopg2`` perform caching if using
+ client side cursors (instantiated with ``connection.cursor()`` and what
+ Django's ORM uses). Using ``iterator()`` does not affect caching at the
+ database driver level. To disable this caching, look at `server side
+ cursors`_.
+.. _server side cursors:

0 comments on commit 6c1c490

Please sign in to comment.
Something went wrong with that request. Please try again.