Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Getting Record Counts

Author  Topic 

clarkbaker1964
Constraint Violating Yak Guru

428 Posts

Posted - 2004-09-20 : 18:37:12
Is their a faster way to get record counts from the tables than
Select Count(*) from x
I have some rather large tables and EM seems to "know" the record counts when you double click on a table?

Surf On Dude!

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2004-09-20 : 19:09:29
Have a look at sp_spaceused
The "fast" table counts are read from sysindexes, but is not "reliable"

rockmoose
/* Chaos is the nature of things...Order is a lesser state of chaos */
Go to Top of Page

clarkbaker1964
Constraint Violating Yak Guru

428 Posts

Posted - 2004-09-20 : 19:13:42
Thank you
Tested... I see what you mean...


Surf On Dude!
Go to Top of Page

rukkur
Starting Member

10 Posts

Posted - 2004-09-21 : 06:54:12
Instead of Count(*) Use Count(1) will be faster
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2004-09-21 : 08:23:12
quote:
Originally posted by rukkur

Instead of Count(*) Use Count(1) will be faster


That is not the case

rockmoose
/* Chaos is the nature of things...Order is a lesser state of chaos */
Go to Top of Page
   

- Advertisement -