Thursday, October 4, 2018

We should not use the storageSize as size of the mongo db collection


Please find the following clarification.

Clarification 1.
·         size refers for logical allocation (this is seen by database engine)
·         storageSize refers for physical file space allocation
As WT (WiredTiger) is used, with enabled data compression, then physical allocation is smaller because of compression
Clarification 2.

We can calculate the size of the collection like the
Collection size  = avgObjSize*count
                         =  121 * 81871366 = 9906435286 bytes  (9.906435286 GB).

So, final word is that I think we should not use the storageSize as size of the collection.

No comments:

Post a Comment

Recent Post

Databricks Delta table merge Example

here's some sample code that demonstrates a merge operation on a Delta table using PySpark:   from pyspark.sql import SparkSession # cre...