What is difference between \"size\" and \"storageSize\" displayed by Mongo stats()
function? Which one shows the actual size on disk for a particular collection
in simple words:
size
refers for logical allocation (this is seen by database engine)storageSize
refers for physical file space allocationAs WT (WiredTiger) is used, with enabled data compression, then physical allocation is smaller because of compression
db.collection.storageSize
db.collection.stats