Closed clintonb closed 8 years ago
The Association model inherits from DjangoAssociationMixin, which performs a lookup when logging in. This lookup relies on the server_url and handle columns.
Association
server_url
handle
Due to the lack of indices on these columns this lookup results in a full table scan, which is non-performant for applications with large user bases.
Recommendations
DjangoAssociationMixin
After a quick glance, the documentation doesn't mention DjangoAssociationMixin, so I'm not sure of the value of including it or where to include it.
The
Association
model inherits from DjangoAssociationMixin, which performs a lookup when logging in. This lookup relies on theserver_url
andhandle
columns.Due to the lack of indices on these columns this lookup results in a full table scan, which is non-performant for applications with large user bases.
Recommendations
server_url
andhandle
columns of theAssociation
model.DjangoAssociationMixin
include the same compound index.