Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Some small fixes to DB optimization docs.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15122 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 5a36b43c2721d6e679ddb952c33c28609ee829e2 1 parent 6c54bb7
Luke Plant authored December 31, 2010

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  docs/topics/db/optimization.txt
5  docs/topics/db/optimization.txt
@@ -200,7 +200,7 @@ Don't overuse ``count()`` and ``exists()``
200 200
 
201 201
 If you are going to need other data from the QuerySet, just evaluate it.
202 202
 
203  
-For example, assuming an Email class that has a ``body`` attribute and a
  203
+For example, assuming an Email model that has a ``body`` attribute and a
204 204
 many-to-many relation to User, the following template code is optimal:
205 205
 
206 206
 .. code-block:: html+django
@@ -221,7 +221,8 @@ many-to-many relation to User, the following template code is optimal:
221 221
 
222 222
 It is optimal because:
223 223
 
224  
- 1. Since QuerySets are lazy, this does no database if 'display_inbox' is False.
  224
+ 1. Since QuerySets are lazy, this does no database queries if 'display_inbox'
  225
+    is False.
225 226
 
226 227
  #. Use of ``with`` means that we store ``user.emails.all`` in a variable for
227 228
     later use, allowing its cache to be re-used.

0 notes on commit 5a36b43

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