You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When getting to count of a query with a limit applied before, the limit gets ignored. That is a problem, because so mongodb has to find all. documents matching the query to count them, instead of stopping after reaching the limit. In big collections (big documents, millions of them) this has a big performance impact.
does not return the count of all Documents with foo==bar, instead of maximum 1000.
Expected behavior
Returns 1000 if more documents than 1000 or found, otherwise the count lower than 1000.
Additional context
We moved from pure pymongo queries to beanie. With pymongo this worked as I described my expectation here. So it would be nice to have the same behaviour here.
The text was updated successfully, but these errors were encountered:
Describe the bug
When getting to count of a query with a limit applied before, the limit gets ignored. That is a problem, because so mongodb has to find all. documents matching the query to count them, instead of stopping after reaching the limit. In big collections (big documents, millions of them) this has a big performance impact.
To Reproduce
does not return the count of all Documents with foo==bar, instead of maximum 1000.
Expected behavior
Returns 1000 if more documents than 1000 or found, otherwise the count lower than 1000.
Additional context
We moved from pure pymongo queries to beanie. With pymongo this worked as I described my expectation here. So it would be nice to have the same behaviour here.
The text was updated successfully, but these errors were encountered: