Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-4272

Comment on: "manual/faq/storage.txt"

    XMLWordPrintableJSON

Details

    Description

      The docs say:

      db.collection.totalSize(): the data size plus the index size in bytes.

      I believe that totalSize() is actually storageSize + totalIndexSize.

      Here's the data from a sample collection and the calculations:

      > db.auditMessage.dataSize()
      19304319728
      > db.auditMessage.storageSize()
      19417829280
      > db.auditMessage.totalIndexSize()
      280322336
      > db.auditMessage.totalSize()
      19698151616

      dataSize + totalIndexSize: 19304319728 + 280322336 = 19584642064

      storageSize + totalIndexSize: 19417829280 + 280322336 = 19698151616

      Attachments

        Activity

          People

            Unassigned Unassigned
            mark.helmstetter@mongodb.com Mark Helmstetter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 29 weeks ago