Skip to content

DOCS-14838 dataSize command specify units #5987

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

Merged
merged 1 commit into from
Oct 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions source/reference/command/dataSize.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Definition

.. dbcommand:: dataSize

The :dbcommand:`dataSize` command returns the data size for a set
of data within a certain range:
The :dbcommand:`dataSize` command returns the size in bytes for
the specified data:

.. code-block:: javascript

Expand Down Expand Up @@ -104,9 +104,9 @@ and the upper bound of the key to be examined being ``{field: 100}``.

db.runCommand({ dataSize: "database.collection", keyPattern: { field: 1 }, min: { field: 10 }, max: { field: 100 } })

This will return a document that contains the size of all matching
documents. Replace ``database.collection`` value with database
and collection from your deployment.
This returns a document with the size in bytes for all matching
documents. Replace ``database.collection`` with the database and
collection from your deployment.

The amount of time required to return :dbcommand:`dataSize` depends on the
amount of data in the collection.
Expand Down