SQL Server - Best way to get Table Row Count

Posted: October 16, 2012 in Uncategorized

Reblogged from SQL Server Portal:

Click to visit the original post

Today, we will discuss the efficient way to count records of any table. Lets suppose you have millions of records in a table. How will you calculate the record count quickly ?

Let me explain this with simple examples :

Example 1 :
First, lets use the traditional way to count records from the table.

As per the results, the above query took almost 26 seconds.

Read more… 245 more words

I ran into Muhammand's blog on decreasing row count cost and thought it was a great tip to use in the future!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s