summaryrefslogtreecommitdiff
path: root/docs/ref/models
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2012-10-20 15:21:19 -0400
committerTim Graham <timograham@gmail.com>2012-10-20 15:22:34 -0400
commit2f722d9728c1946d5d800b3e0b24de7f566a755d (patch)
tree1a5343ef19c8735e10c6e03e40b04100581642cf /docs/ref/models
parent4b27813198ae31892f1159d437e492f7745761a0 (diff)
Fixed #13869 - Warned that QuerySet.iterator() doesn't affect DB driver caching; thanks jtiai for the suggestion.
Diffstat (limited to 'docs/ref/models')
-rw-r--r--docs/ref/models/querysets.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 858371978a..7138cd0e74 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -1456,6 +1456,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: http://initd.org/psycopg/docs/usage.html#server-side-cursors
+
latest
~~~~~~