Home All Groups Group Topic Archive Search About
Author
17 Apr 2007 1:02 PM
Ganesha
Hi,
  I use SQL Server 2005. I have a table with around 7 million records in it.
I am doing a count(*) on it to get the records based on some condition.

ie., Select COUNT(*) from <table_name> where <condition>.

It should return around 4000 records. It takes approximately 15 seconds to
do this. As a result my web application has becum very slow and thats not
acceptable. Can any one suggest is there any other way to do this. Getting
the last record rown number or something like that. please let me know on
this.

Actually i am doing custom paging in the gridview and to get the number of
pages i need total number of records to calculate page numbers.

Please let me know abt any other alternate way to get the record count.


Thank you,

AddThis Social Bookmark Button