Small corrections/improvements to DB optimization docs.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13419 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Luke Plant 2010-07-05 16:26:12 +00:00
parent f92a21daa7
commit 2cf21d994d
1 changed files with 3 additions and 7 deletions

View File

@ -5,7 +5,7 @@ Database access optimization
============================ ============================
Django's database layer provides various ways to help developers get the most Django's database layer provides various ways to help developers get the most
out of their databases. This documents gathers together links to the relevant out of their databases. This document gathers together links to the relevant
documentation, and adds various tips, organized under an number of headings that documentation, and adds various tips, organized under an number of headings that
outline the steps to take when attempting to optimize your database usage. outline the steps to take when attempting to optimize your database usage.
@ -108,9 +108,8 @@ Do database work in the database rather than in Python
For instance: For instance:
* At the most basic level, use :ref:`filter and exclude <queryset-api>` to * At the most basic level, use :ref:`filter and exclude <queryset-api>` to do
filtering in the database to avoid loading data into your Python process, only filtering in the database.
to throw much of it away.
* Use :ref:`F() object query expressions <query-expressions>` to do filtering * Use :ref:`F() object query expressions <query-expressions>` to do filtering
against other fields within the same model. against other fields within the same model.
@ -245,9 +244,6 @@ methods of individual instances, which means that any custom behaviour you have
added for these methods will not be executed, including anything driven from the added for these methods will not be executed, including anything driven from the
normal database object :ref:`signals <ref-signals>`. normal database object :ref:`signals <ref-signals>`.
Don't retrieve things you already have
======================================
Use foreign key values directly Use foreign key values directly
------------------------------- -------------------------------