How do I determine the disk size of a SharePoint list?
Solution 1
If you enable a site quota, an option under site settings appears called Storage Space Allocation. When you go to set a quota in the Central Administration, the page will tell you what the current storage used is so you can have an idea before there. Once you get to the Storage Space Allocation report, you can see the total size of a library.
Unfortunately, you can't get this report without turning on a site quota.
Solution 2
Navigate to http://[myapplication]/[mySitecollection]/_layouts/storman.aspx
This will list the Storage Space Allocation for the site collection.
Solution 3
I could not get Tim Dobrinski's suggestion to work. This T-SQL query does not deal with everything, but gives a very good idea. Pop it into Excel, then add a column for "Size in MB" and add in a formula.
USE [WSS_Content]
GO
SELECT
[dbo].[Webs].[FullUrl]
,[dbo].[Lists].[tp_Title] AS "ListName"
,[dbo].[Docs].[DirName]
,[dbo].[Docs].[LeafName]
,[dbo].[Docs].[Size]
,[dbo].[Docs].[MetaInfoSize]
,[dbo].[Docs].[Version]
,[dbo].[Docs].[TimeCreated]
,[dbo].[Docs].[TimeLastModified]
,[dbo].[Docs].[MetaInfoTimeLastModified]
,[dbo].[Docs].[CheckoutUserId]
,[dbo].[Docs].[CheckoutDate]
,[dbo].[Docs].[ExtensionForFile]
FROM [WSS_Content].[dbo].[Docs]
INNER JOIN [WSS_Content].[dbo].[Webs] ON [dbo].[Webs].[Id] = [dbo].[Docs].[WebId]
INNER JOIN [WSS_Content].[dbo].[Lists] ON [dbo].[Lists].[tp_ID] = [dbo].[Docs].[ListId]
WHERE [dbo].[Docs].[Size] > 0
AND ([dbo].[Docs].[LeafName] NOT LIKE '%.stp')
AND ([dbo].[Docs].[LeafName] NOT LIKE '%.aspx')
AND ([dbo].[Docs].[LeafName] NOT LIKE '%.xfp')
AND ([dbo].[Docs].[LeafName] NOT LIKE '%.dwp')
AND ([dbo].[Docs].[LeafName] NOT LIKE '%template%')
AND ([dbo].[Docs].[LeafName] NOT LIKE '%.inf')
AND ([dbo].[Docs].[LeafName] NOT LIKE '%.css')
Solution 4
If you save the list in question as a template to the file system, this should give you a rough idea of its size. If you need to do this on a periodic basis this approach is not as useful.
Nathan DeWitt
Software Architect, currently working with SharePoint 2010.
Updated on June 12, 2022Comments
-
Nathan DeWitt almost 2 years
I have a list with roughly 5500 items, and I would like to find out the size on disk. Is there some way I can do this? I don't mind running a query in the database, if necessary.
-
Nat almost 15 yearsp.s. site quotas are a really good thing - it is amazing how fast unfettered users can upload documents.
-
Peter over 12 yearsI used this but with a few tweaks. Since we have around a million items moving this to Excel and summing it there was out of the question. Instead I did a GROUP BY [dbo].[Lists].[tp_Title] and selected [dbo].[Lists].[tp_Title] AS "ListName", SUM([dbo].[Docs].[Size]/1024+[dbo].[Docs].[MetaInfoSize]/1024). This showed me how big each List was in KB. I then exported this to Excel and worked with it.
-
Emaborsa over 7 yearsThis only works if the total size is less than 50mb.
-
Nathan DeWitt over 7 yearsAck! Don't query the content DB directly!
-
Emaborsa over 7 yearsThe user wrote
I don't mind running a query in the database, if necessary.