mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[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
This commit is contained in:
parent
773a29295a
commit
fd90a90633
@ -972,6 +972,12 @@ need to use::
|
|||||||
This sort of reference can be useful when resolving circular import
|
This sort of reference can be useful when resolving circular import
|
||||||
dependencies between two applications.
|
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
|
Database Representation
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user