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
 General SQL Server Forums
 Database Design and Application Architecture
 table partitioning-row count

Author  Topic 

bahrammm
Starting Member

1 Post

Posted - 2010-06-05 : 15:57:17
I have a table with over 7 million records,
I have partitioned the table into 20 partitions(using a partition function), but the count(*)query is still too slow for the partitions, not much difference with the query speed for unpartitioned table! does it have to be quicker?
is there another way to achieve that? for now I get time out for the first count query!

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2010-06-05 : 23:53:48
count(*) will scan all rows so partitioning won't help. do you need an exact count? if not can just use sp_spaceused or similar.


elsasoft.org
Go to Top of Page
   

- Advertisement -