MSSQL 快速统计数据库表行数的方法

在数据库优化,数据库大小分析中,我们经常需要快速获取表行数多少
以下

select schema_name(t.schema_id) as [Schema], t.name as TableName,i.rows as [RowCount]
from sys.tables as t, sysindexes as i
where t.object_id = i.id and i.indid <=1