Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django Association model missing index #967

Closed
clintonb opened this issue Jul 28, 2016 · 1 comment
Closed

Django Association model missing index #967

clintonb opened this issue Jul 28, 2016 · 1 comment

Comments

@clintonb
Copy link
Contributor

The Association model inherits from DjangoAssociationMixin, which performs a lookup when logging in. This lookup relies on the server_url and handle 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

  1. Add a compound index on the server_url and handle columns of the Association model.
  2. Update the documentation recommending that those classes inheriting DjangoAssociationMixin include the same compound index.
@clintonb
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant