Sharepoint - AllDocVersions table growing rapidly in size

  • Hi,

    We have a Sharepoint database, housing a local website, which seems to grow rapidly in size. We managed to isolate to problem to one particular table called AllDocVersions, which seems to store versions to webpages (if I understand it correctly).

    I´ve read that this seems to be a known issue with Sharepoint databases.

    Has anyone encountered this "exciting" feature? 🙂

    On a website we found this code to delete unwanted rows from that table:

    "DELETE FROM dbo.AllDocVersions WHERE DeleteTransactionID <> 0x"

    ... but we didn´t find any rows where DeleteTransactionID does not contain 0x

    Any help would be appreciated 🙂

  • Hi,

    Never make modifications on SharePoint tables unless you are completely confident and understand what you do. Better never do this at all.

    I think that your problem is related to the document libraries settings on Sharepoint. Some libraries can have unlimited number of document versions and this is the main reason that database grows fast.

    You can run this qury to determine document libraries with large files and multiple versions (run it against content database and sort by number of versions or total number of Document Library):

    SELECT v.[Id], d.DirName

    ,count(v.[Version]) MaxNumberOfVersions

    ,sum(v.[Size]) TotalDocLibSize,max(v.[Size]) LargestDocSize

    FROM [dbo].[AllDocVersions] v join [dbo].AllDocs d

    on v.id=d.id

    group by v.id , d.DirName order by 4 desc

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply