How to tune a T-SQL with Query Cost 100%?
This is indeed an interesting question and I have received during Comprehensive Database Performance Health Check.
One of the most popular questions I received during my Comprehensive Database Performance Health Check is Finding Queries Using Particular Index.
Today we will take the same conversation to the next level by discussing Single Scan for 3 Operations – COUNT(*) COUNT(1) SUM(1).
One question that kept on coming up was SUM(1) vs COUNT(*) – Performance Observation. Well, let us see that today.