Hi,
Is there an easier way to determine which tables in a db are the largest other than running sp_spaceused for each table? Interested mainly in physical size.
ThanksRun DBCC UPDATEUSAGE (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_dbcc_24rp.asp) to bring your statistics up to date, then you can use:SELECT so.name, 8 * Sum(si.reserved)
FROM dbo.sysobjects AS so
JOIN dbo.sysindexes AS si
ON (si.id = so.id)
ORDER BY 2 desc, 1for a good estimate.
-PatP
No comments:
Post a Comment