Fixed #30419 -- Favored Meta.indexes over Meta.index_together in optimization docs.

This commit is contained in:
Akshesh 2019-05-02 12:24:32 +07:00 committed by Mariusz Felisiak
parent 28eac41510
commit 888fdf182e
1 changed files with 4 additions and 4 deletions

View File

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