Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Row count of all tables Expand / Collapse
Author
Message
Posted Tuesday, September 25, 2007 12:12 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, January 2, 2009 2:41 PM
Points: 110, Visits: 20
Comments posted to this topic are about the item Row count of all tables
Post #402691
Posted Friday, October 5, 2007 10:01 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, July 12, 2012 2:43 PM
Points: 399, Visits: 67
The following query also gives the same results without creating a table.

select
TableName = object_name(id),
[RowCount] = max(rows)
from sysindexes
group by id
Post #407452
Posted Friday, October 5, 2007 10:13 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Thursday, November 27, 2014 4:23 AM
Points: 20,584, Visits: 9,624
This works only if the stats are up to table. It's ok if an estimate is all you need. However if you need accuracy, you need to use count(*).
Post #407461
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse