Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30419 closed Cleanup/optimization (fixed)

Minor improvements for docs related to Meta.indexes

Reported by: Akshesh Doshi Owned by: Akshesh Doshi
Component: Documentation Version: 2.2
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I think a bit more details can be added to https://docs.djangoproject.com/en/2.1/ref/models/indexes/ about what functionalities (& extra advantages over index_together) the Index provides. This would help users to know more about what they can do with the Index class.

Also, Meta.indexes should also be added to the list of ways to create indexes over here - https://docs.djangoproject.com/en/2.1/topics/db/optimization/#use-standard-db-optimization-techniques.

Change History (7)

comment:1 by Akshesh Doshi, 5 years ago

On a second thought, I think it might be sensible to even remove Meta.index_together from the https://docs.djangoproject.com/en/2.1/topics/db/optimization/#use-standard-db-optimization-techniques list. This is because Django officially says that Meta.indexes is preferred over it over here - https://docs.djangoproject.com/en/2.1/ref/models/options/#django.db.models.Options.index_together

comment:2 by Akshesh Doshi, 5 years ago

Summary: Minor improvements related to Meta.indexesMinor improvements for docs related to Meta.indexes

comment:3 by Akshesh Doshi, 5 years ago

Has patch: set
Owner: changed from nobody to Akshesh Doshi

PR (assuming that the ticket gets accepted) - https://github.com/django/django/pull/11296

comment:4 by Carlton Gibson, 5 years ago

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

OK, accepting modulo comments on the PR. (Replacing the index_together usage to point to indexes is probably worth it.)

Thanks.

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In 888fdf1:

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

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In efb906cb:

[2.2.x] Fixed #30419 -- Favored Meta.indexes over Meta.index_together in optimization docs.

Backport of 888fdf182e164fa4b24aa82fa833c90a2b9bee7a from master

Note: See TracTickets for help on using tickets.
Back to Top