Browse files

Fixed #18046 - Documented than an index is created by default for For…

…eignKeys; thanks jbauer for the suggestion.
  • Loading branch information...
1 parent 4fb510f commit db598dd8a053fe17c3308f89cd8f40676e2c479e @timgraham timgraham committed Oct 16, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 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

0 comments on commit db598dd

Please sign in to comment.