summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2012-10-16 16:12:52 -0400
committerTim Graham <timograham@gmail.com>2012-10-18 16:59:23 -0400
commitfd90a906333b569340e5507fec3f3a4d4c1d0f47 (patch)
tree4459a54a7138b9ae43ff491c45fc5024b779acce /docs
parent773a29295a8811fd018b3b30c6efa9266c5f540a (diff)
[1.4.X] Fixed #18046 - Documented that an index is created by default for ForeignKeys; thanks jbauer for the suggestion.
Backport of db598dd8a0 from master
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/fields.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index c8b9db33f6..b186a461c7 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -972,6 +972,12 @@ need to use::
This sort of reference can be useful when resolving circular import
dependencies between two applications.
+A database index is automatically created on the ``ForeignKey``. You can
+disable this by setting :attr:`~Field.db_index` to ``False``. You may want to
+avoid the overhead of an index if you are creating a foreign key for
+consistency rather than joins, or if you will be creating an alternative index
+like a partial or multiple column index.
+
Database Representation
~~~~~~~~~~~~~~~~~~~~~~~