summaryrefslogtreecommitdiff
path: root/docs/ref
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:58:05 -0400
commitdb598dd8a053fe17c3308f89cd8f40676e2c479e (patch)
treed02bc1af8e6b64635a659a4268e9e23fc034bda9 /docs/ref
parent4fb510fde4db95d15205afefdefade97eee4d3ef (diff)
Fixed #18046 - Documented than an index is created by default for ForeignKeys; thanks jbauer for the suggestion.
Diffstat (limited to 'docs/ref')
-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 02d8453b83..809d56eaf5 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -971,6 +971,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
~~~~~~~~~~~~~~~~~~~~~~~