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

Use count() on queryset instead of len() #66

Merged
merged 1 commit into from Jan 7, 2018

Conversation

@dulacp
Copy link
Contributor

commented Jan 6, 2018

Ensure a fast query even for millions of rows, instead of len() which can be super slow because it will fetch data, then convert them to Python objects.

Cheers

Use count() on queryset instead of len()
Ensure a fast query even for millions of rows.

thornomad added a commit that referenced this pull request Jan 6, 2018

@thornomad thornomad merged commit 79e22a8 into thornomad:master Jan 7, 2018

@thornomad

This comment has been minimized.

Copy link
Owner

commented Jan 7, 2018

Thanks @dulacp - been updated... appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.