statistics | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

statistics

Is there a stored procedure that will return a list of all tables in the db along with their row count? Right now I am using: select o.name,
rows from sysobjects o inner join sysindexes i on o.id = i.id
where i.indid < 2 and xtype=’u’ and o.name not in (‘dtproperties’) order by o.name
but I figured that their must be a more concise way to do this. Thanks, Ben
Use undocumented sP SP_MSforeachtable by using SP_SPACEUSED. http://www.nigelrivett.net/SpaceUsedAllTables.html for more information.
Always run DBCC UPDATEUSAGE before running this SP to get optimum results. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
thank you
]]>