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
Just a note: count_documents() is slower than count() as it's used in the codebase currently. estimated_document_count() gives us the same behavior as count(), so I propose we use that instead.
On Fri, May 22, 2020 at 4:10 PM Insiya Bambot ***@***.***> wrote:
Just a note:
count_documents() is slower than count() as it's used in the codebase
currently.
estimated_document_count() gives us the same behavior as count(), so I
propose we use that instead.
The reason that count() was deprecated in the first place was because its
behavior would be like the current count_documents() if it was given a
query, and estimated_document_count() otherwise. In our codebase, we
pretty much never give count() a query.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#165 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE5CFT45W7MV2SA4JQUNRYTRS4A5BANCNFSM4ME3XKTA>
.
https://api.mongodb.com/python/current/api/pymongo/collection.html#pymongo.collection.Collection.count_documents
The text was updated successfully, but these errors were encountered: