Add PostgreSQL indexes for all generic foreign key fields #14436
Labels
status: accepted
This issue has been accepted for implementation
type: housekeeping
Changes to the application which do not directly impact the end user
Milestone
Proposed Changes
For all GenericForeignKey (GFK) relationships in a model, a PostgreSQL index should be created for its two concrete fields (content type and ID).
Justification
Creating indexes for these fields enables optimized lookup of records by related object. (Django unfortunately does not create these indexes automatically.)
The text was updated successfully, but these errors were encountered: