3

We have a site collection that has couple of document libraries each having 10K documents. And the content DB assigned to that site collection is showing 280 GB used. But when we check the library size using the following powershell -

    $total = $null; 
 ((get-spweb http://sitename/).lists | Where-Object {$_.title -eq "List   name"}).items | foreach {$total+= $_.file.length}; $total /1MB  

we get 40 GB as total size for both libraries. Are we missing anything, what would be the cause of the remaining size that is being used up in content Db.

Please find snapshot of content DB Usage by table report enter image description here

4
  • 2
    is versioning enabled in these libraries? Commented May 24, 2016 at 14:25
  • yes, versioning is enabled
    – TheCoder
    Commented May 24, 2016 at 14:33
  • do you have auditing enabled on the site collections? can you get a report by large size first? Also check how much unused space in the Database?
    – Waqas Sarwar MVP
    Commented May 24, 2016 at 14:37
  • no we have not enabled auditing.
    – TheCoder
    Commented May 24, 2016 at 14:47

2 Answers 2

2

In SharePoint 2010, versioning stores complete copies of previous versions. The size you are seeing is all the previous versions.

Some things to combat this, in your versioning settings in the libraries, set maximum number of major and minor versions. After setting that, you'll need to perform some scripted maintenance to purge the versions.

You would want to check out each file, check it in, and publish it as a major version. You will then see file size decrease. You won't see the database size decrease though unless you shrink the database, but that is not generally a recommended practice.

2
  • Thanks, but in the table AllDocStreams has consumed maximum space. Does this table store version information as well?
    – TheCoder
    Commented May 24, 2016 at 14:48
  • Not 100% certain to be honest, I don't make it a habit of querying the SharePoint databases Commented May 24, 2016 at 14:50
2

AllDocStreams stores the actual binary content of a document. In 2010, this would store the binary content of each file, while in 2013/2016 it would only store the difference from the previous version.

2
  • Thank you. So will the migration to 2013 provide relief?
    – TheCoder
    Commented May 25, 2016 at 4:54
  • Upgrading from 2010 to 2013 doesn't shred previously stored content, only as new content is added or new versions created will documents become shredded.
    – user6024
    Commented May 25, 2016 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.