Technical Article

Get fast-rowcount  for all tables in a database

,

This little query gives the table name and rowcount for each table in the database that its run.

select A.Name, max(b.Rows) from sysobjects A inner join sysindexes B on a.Id = B.Id
where xtype='u' and OBJECTPROPERTY(a.id, N'IsUserTable') = 1
group by a.name
order by max(b.Rows) DESC

Rate

(1)

You rated this post out of 5. Change rating

Share

Share

Rate

(1)

You rated this post out of 5. Change rating