Skip to content

Commit a144aa4

Browse files
jason-price-mongodbjason-price-mongodb
andauthored
DOCSP-19647-update-estimatedDocumentCount (#870) (#885)
* DOCSP-19647-update-estimatedDocumentCount * DOCSP-19647-update-estimatedDocumentCount * DOCSP-19647-update-estimatedDocumentCount Co-authored-by: jason-price-mongodb <[email protected]> Co-authored-by: jason-price-mongodb <[email protected]>
1 parent 50b50cd commit a144aa4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

source/reference/method/db.collection.estimatedDocumentCount.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ Mechanics
6464
:method:`db.collection.estimatedDocumentCount()` does not take a query
6565
filter and instead uses metadata to return the count for a collection.
6666

67+
For a :ref:`view <views-landing-page>`:
68+
69+
- There is no metadata.
70+
71+
- The document count is calculated by executing the :ref:`aggregation
72+
pipeline <aggregation-pipeline>` in the view definition.
73+
74+
- There is no fast estimated document count.
75+
6776
Sharded Clusters
6877
~~~~~~~~~~~~~~~~
6978

@@ -73,6 +82,8 @@ On a sharded cluster, the resulting count will not correctly filter out
7382
Unclean Shutdown
7483
~~~~~~~~~~~~~~~~
7584

85+
This section only applies to collections.
86+
7687
After an unclean shutdown, the count may be incorrect.
7788

7889
.. include:: /includes/fact-unexpected-shutdown-accuracy.rst

0 commit comments

Comments
 (0)