mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? Yes ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Feature/BugFix ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) No ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) Improve performance of estimatedDocumentsCount ### Description Mongo Spec specifies that count() without any filters maps to the "estimatedDocumentsCount" that uses statistics. In pgmongo we were using the full fidelity count in this path too. Instead use collStats with documentsCount to fetch the count if there's no filters/limit/skip.