select sum(rows) from sysindexes where id in(select id from sysobjects where xtype='u') and indid in (0,1)
一个大致的结果,数据相对正确,关键是快速取到.
系统表的作用就不解释了