Well, the answer is pretty straight forward and that is what we are going to see in today’s video of One Scan for 3 Count Sum.
TRUNCATE TABLE WITH PARTITIONS: Empty One Partition Fast
TRUNCATE TABLE WITH PARTITIONS empties one partition and logs far less than DELETE. See the syntax, the index rule and the limits in SQL Server.
SQL Server – Single Scan for 3 Operations – COUNT(*) COUNT(1) SUM(1)
Today we will take the same conversation to the next level by discussing Single Scan for 3 Operations – COUNT(*) COUNT(1) SUM(1).
SUM(1) vs COUNT(1) Performance Battle – SQL in Sixty Seconds #177
Based on my recent two videos, I got lots of questions about SUM(1) vs COUNT(1) Performance Battle. Let us see that in today’s video.
Latch Waits at the Top: Reading sys.dm_os_latch_stats
Sample SQL Server latch waits by class, then connect ACCESS_METHODS_DATASET_PARENT, FGCB_ADD_REMOVE, and LOG_MANAGER to the next check.
SQL SERVER – SUM(1) vs COUNT(*) – Performance Observation
My Performance Observation found similar counting plans for a nonempty table. SUM(1) and COUNT(*) still differ on empty input.
Conditional Aggregation: Several Counts in One Pass With CASE
Use conditional aggregation for several ticket counts, avoid COUNT with ELSE zero, and calculate percentages with an explicit denominator.
COUNT(*) and COUNT(1): Performance Battle – SQL in Sixty Seconds #176
COUNT(*) and COUNT(1): Performance Battle – which one is better for performance? I got this question after watching my previous video.
COUNT(*) and Index Frequently Asked Questions
My Index Frequently Asked Questions discussion follows the counting video. I distinguish exact results, estimates and the expression being counted.
COUNT(*) and Index – SQL in Sixty Seconds #175
Earlier I wrote two blog post on the topic of COUNT(*) and Index and today I have to build a video on that topic as many of you really wanted.










