This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
Jul1

TRUNCATE TABLE WITH PARTITIONS: Empty One Partition Fast

Pinal Dave
SQL Performance
SQL Delete, SQL Scripts, SQL Transactions, Table Partitioning
No Comments

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.

Continue Reading
Jun30

SQL Server – Single Scan for 3 Operations – COUNT(*) COUNT(1) SUM(1)

Pinal Dave
SQL Performance
Execution Plan, SQL Function, SQL Index, SQL Scripts, SQL Server, SQL Server Management Studio
No Comments

Today we will take the same conversation to the next level by discussing Single Scan for 3 Operations – COUNT(*) COUNT(1) SUM(1).

Continue Reading
Jun29

SUM(1) vs COUNT(1) Performance Battle – SQL in Sixty Seconds #177

Pinal Dave
SQL Video
Execution Plan, SQL Function, SQL in Sixty Seconds, SQL Scripts, SQL Server
No Comments

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.

Continue Reading
Jun28

Latch Waits at the Top: Reading sys.dm_os_latch_stats

Pinal Dave
SQL Performance
DBA, SQL DMV, SQL Performance, SQL Wait Stats
No Comments

Sample SQL Server latch waits by class, then connect ACCESS_METHODS_DATASET_PARENT, FGCB_ADD_REMOVE, and LOG_MANAGER to the next check.

Continue Reading
Jun25

SQL SERVER – SUM(1) vs COUNT(*) – Performance Observation

Pinal Dave
SQL Performance
Execution Plan, SQL Scripts, SQL Server
No Comments

My Performance Observation found similar counting plans for a nonempty table. SUM(1) and COUNT(*) still differ on empty input.

Continue Reading
Jun24

Conditional Aggregation: Several Counts in One Pass With CASE

Pinal Dave
SQL Tips and Tricks
PIVOT and UNPIVOT, SQL CASE, SQL Group By, SQL Scripts, SQL Server
No Comments

Use conditional aggregation for several ticket counts, avoid COUNT with ELSE zero, and calculate percentages with an explicit denominator.

Continue Reading
Jun23

COUNT(*) and COUNT(1): Performance Battle – SQL in Sixty Seconds #176

Pinal Dave
SQL Video
Execution Plan, SQL in Sixty Seconds, SQL Scripts, SQL Server
1 Comment

COUNT(*) and COUNT(1): Performance Battle – which one is better for performance? I got this question after watching my previous video.

Continue Reading
Previous 1 … 64 65 66 67 68 69 70 … 846 Next

SQL Server slow? Let's fix it together in about four hours.

Pinal Dave

In my Comprehensive Database Performance Health Check, you share your screen, I guide you, and we fix your biggest performance troublemakers. No passwords. No remote access.

You keep every script, and the know-how to fix it yourself next time.

Want your whole team to learn it?

My Practical Workshop has no PowerPoint, just live demos. My AI Enablement Workshop shows your team where AI saves hours, and where it quietly costs them.

Over 400 customers have worked with me this way, and not one shared a password. See all consulting options.


Who We Are

Pinal Dave is an SQL Server Performance Tuning Expert and independent consultant with over 24 years of hands-on experience. He holds a Masters of Science degree and numerous database certifications.

Pinal has authored 19 books and 125 Pluralsight courses. To freely share his knowledge and help others build their expertise, Pinal has also written more than 5,800 database tech articles on his blog at https://blog.sqlauthority.com.

Pinal is also a CrossFit Level 1 Trainer (CF-L1) and CrossFit Level 2 Trainer (CF-L2).


Nupur Dave is a social media enthusiast and an independent consultant. She primarily focuses on the database domain, helping clients build short and long-term multi-channel campaigns to drive leads for their sales pipeline.


Shaivi Pinalkumar Dave is a book author and a women’s artistic gymnast.

  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com