Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-16956

db.stats() does not show indexes or indexSize correctly for WT

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.8.0-rc5
    • Component/s: Storage
    • ALL

      With WT:

      > db.stats(1024*1024*1024)
      {
      	"db" : "ycsb",
      	"collections" : 1,
      	"objects" : 29799900,
      	"avgObjSize" : 150.8795339917248,
      	"dataSize" : 4.187407926656306,
      	"storageSize" : 7.79156494140625,
      	"numExtents" : 0,
      	"indexes" : 1,
      	"indexSize" : 0.6202392578125,
      	"ok" : 1
      }
      > db.usertable.stats()
      {
      	"ns" : "ycsb.usertable",
      	"count" : 29799900,
      	"size" : 4496195025,
      	"avgObjSize" : 150,
      	"storageSize" : 8366129152,
      	"capped" : false,
      	"wiredTiger" : {
          [ ... ]
      	},
      	"totalIndexSize" : 665976832,
      	"indexSizes" : {
      		"_id_" : 665976832
      	},
      	"ok" : 1
      }
      

      Not sure why indexes aren't showing up on the DB level since they show up in the collection fine.

            Assignee:
            Unassigned Unassigned
            Reporter:
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: