0
votes

There is a problem with SharePoint database "WSS_Content_" I've got a simple document library in my SharePoint site. when I add a file of specific size(e.g 1MB),SharePoint stores the file in .mdf file 10 times of the original(1GB). I got it by checking the file size in AllDocs Table. As a reult, the original database size has grown up to 240 GB from 78 GB. Here is AllDocs Table: Also shrinking database couldn't be useful. Any idea to fix my SharePoint database is greatly appreciated.

2

2 Answers

1
votes

You should expect the database to be larger than the sum of your content. The physical database size includes not just content (which itself includes deleted documents/items that haven't been flushed from site recycle bins), but also transaction logs, permissions, table metadata, the database schema, indexes, and any pre-allocated space for future growth.

A database of 240 GB for only 78 GB of content does seem quite large (68% overhead sounds excessive), so you might want to look into defragmentation and shrink operations. You should verify how your SQL Server is configured in terms of pre-allocation of space; this can cause sudden large spikes in storage consumption when SQL decides it needs more storage for future growth (even though it's not consuming it with data just yet).

All that being said, your screenshot suggests that your math is off by a factor of ten; 1457664 bytes is only 1.457664 MB, not very close to 1 GB.

0
votes

By the way, you can save much more space in database if you turn off versioning, because for one document it stores all its versions sepereately