- Reference >
- Database Commands >
- Diagnostic Commands >
- dataSize
dataSize¶
-
dataSize¶ The
dataSizecommand returns the data size for a set of data within a certain range:This will return a document that contains the size of all matching documents. Replace
database.collectionvalue with database and collection from your deployment. ThekeyPattern,min, andmaxparameters are options.The amount of time required to return
dataSizedepends on the amount of data in the collection.