diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index dc45576..cfe5d37 100644
a
|
b
|
class RawQuery(object):
|
71 | 71 | # Always execute a new query for a new iterator. |
72 | 72 | # This could be optimized with a cache at the expense of RAM. |
73 | 73 | self._execute_query() |
74 | | return iter(self.cursor) |
| 74 | if not connections[self.using].features.can_use_chunked_reads: |
| 75 | # If the database can't use chunked reads we need to make sure we |
| 76 | # evaluate the entire query up front. |
| 77 | result = list(self.cursor) |
| 78 | else: |
| 79 | result = self.cursor |
| 80 | return iter(result) |
75 | 81 | |
76 | 82 | def __repr__(self): |
77 | 83 | return "<RawQuery: %r>" % (self.sql % self.params) |