|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Wednesday, January 16, 2013 4:11 AM
Points: 1,569,
Visits: 56
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 2:38 PM
Points: 9,
Visits: 99
|
|
Ok for small db's but this is lightning quick and avoids cursors/looping...
select o.name, i.rows from sys.sysobjects o with (nolock) join sys.sysindexes i with (nolock) on o.id = i.id where i.indid < 2 order by i.rows desc, o.name
http://msdn.microsoft.com/en-us/library/ms190283.aspx
|
|
|
|