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

Fix suboptimal DB queries #25

Open
nkorobkov opened this issue Dec 3, 2019 · 1 comment
Open

Fix suboptimal DB queries #25

nkorobkov opened this issue Dec 3, 2019 · 1 comment
Assignees

Comments

@nkorobkov
Copy link
Owner

Problem
Some pages load very slow
I suspect that code has places where unnecessary joins are executed during page rendering.

What to do
Look through the code and find all suspicious places.
Fix all problems with Django object annotations
https://docs.djangoproject.com/en/2.2/topics/db/aggregation/

Also:
https://medium.com/@hansonkd/the-dramatic-benefits-of-django-subqueries-and-annotations-4195e0dafb16

Criteria
There are no DB queries in a loop and no extra joins in the code.

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

No branches or pull requests

2 participants