Skip to content

Commit

Permalink
[2.2.x] Fixed #30419 -- Favored Meta.indexes over Meta.index_together…
Browse files Browse the repository at this point in the history
… in optimization docs.

Backport of 888fdf1 from master
  • Loading branch information
akki authored and felixxm committed May 22, 2019
1 parent a7515c3 commit efb906c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/topics/db/optimization.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ Use standard DB optimization techniques

* Indexes_. This is a number one priority, *after* you have determined from
profiling what indexes should be added. Use
:attr:`Field.db_index <django.db.models.Field.db_index>` or
:attr:`Meta.index_together <django.db.models.Options.index_together>` to add
these from Django. Consider adding indexes to fields that you frequently
query using :meth:`~django.db.models.query.QuerySet.filter()`,
:attr:`Meta.indexes <django.db.models.Options.indexes>` or
:attr:`Field.db_index <django.db.models.Field.db_index>` to add these from
Django. Consider adding indexes to fields that you frequently query using
:meth:`~django.db.models.query.QuerySet.filter()`,
:meth:`~django.db.models.query.QuerySet.exclude()`,
:meth:`~django.db.models.query.QuerySet.order_by()`, etc. as indexes may help
to speed up lookups. Note that determining the best indexes is a complex
Expand Down

0 comments on commit efb906c

Please sign in to comment.