SQL SERVER – COUNT(*) Collection of Articles

It is fun to see how simple a subject interests us when working with SQL Server Performance Tuning. I believe SQL Server Performance Tuning is a very simple technique and I often discuss this with my clients during Comprehensive Database Performance Health Check. Today we are building a Collection of Articles that have recently generated interest on the blog as well as on the YouTube channel –  SQL in Sixty Seconds.

SQL SERVER - COUNT(*) Collection of Articles CollectionofArticles-800x211

The first video I build discusses how COUNT(*) uses the Indexes: COUNT(*) and Index – SQL in Sixty Seconds #175. Here I discuss how clustered and nonclustered index are chose by COUNT(*) operation.

In the response to the previous video, many asked if there will be a difference in performance Here is the second video I build COUNT(*) and COUNT(1): Performance Battle – SQL in Sixty Seconds #176.

Well, that’s it for today. If you liked this video, please do not forget to subscribe to my YouTube Channel – SQL in Sixty Seconds.

There were so many questions on these topics, and I have built Frequently Asked Questions here:  COUNT(*) and Index Frequently Asked Questions.

Here are the previous two blog post, I strongly suggest you read them first before watching this video.

If you are looking forward to retrieving the row count of the table fastest possible way, I strongly suggest that you watch another video: Fastest Way to Retrieve Rowcount for a Table – SQL in Sixty Seconds #096

Many thought of using NOLOCK with COUN(*) or COUN(1), however, that is also not a good idea. Here is where I discuss why NOLOCK is not a good idea. Dirty Read with NOLOCK – SQL in Sixty Seconds #110

If you are in a fun mood, here is interesting puzzle:  Solution – Puzzle – SELECT * vs SELECT COUNT(*)

Well, that’s it for today, I hope you enjoyed the COUNT(*) Collection of Articles.

Reference: Pinal Dave (http://blog.SQLAuthority.com)

Execution Plan, SQL Server
Previous Post
SQL SERVER – COUNT(*) and Index Used
Next Post
SQL SERVER – SUM(1) vs COUNT(*) – Performance Observation

Related Posts

Leave a Reply