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
Nov25

Locally Aggregated Rows: Why a Columnstore Scan Shows Zero

Pinal Dave
SQL Performance
ColumnStore Index, Execution Plan, SQL Scripts
No Comments

A columnstore scan shows zero actual rows when it aggregates rows itself, and the rows sit in the locally aggregated rows property. A tested demo on 1,000,000 rows shows 0 actual rows and 1,000,000 locally aggregated rows. The post also covers a scan that really is empty, and what STATISTICS IO counts.

Continue Reading
Nov24

How to Disable Batch Mode in SQL Server? – Interview Question of the Week #252

Pinal Dave
SQL Interview Questions and Answers
ColumnStore Index, SQL Index, SQL Performance, SQL Scripts, SQL Server
4 Comments

My immediate reaction was why would you disable batch mode in SQL Server when it is really is an awesome feature for performance

Continue Reading
Nov23

STATISTICS TIME and IO: Turn Them On for Every SSMS Query

Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server Management Studio, SQL Shortcut, SQL Statistics
1 Comment

To get STATISTICS TIME and IO for every query, tick two boxes in the SSMS options once instead of typing SET STATISTICS in each window. This post builds a small demo, reads the output line by line, shows that a SELECT and an UPDATE both report their cost, and explains which windows the option affects.

Continue Reading
Nov22

Procedure Recompilation: Force a New Plan in SQL Server

Pinal Dave
SQL Tips and Tricks
Execution Plan, SQL Scripts, SQL Stored Procedure
2 Comments

Procedure recompilation builds a new plan without changing the procedure. A tested demo compares EXEC with WITH RECOMPILE and sp_recompile on a skewed table, with 100,089 reads on a stale plan and 348 on a fresh one. It also shows that sp_recompile removes every cached plan of the procedure.

Continue Reading
Nov21

Row Mode vs Batch Mode: Measuring the Speed Difference

Pinal Dave
SQL Performance
ColumnStore Index, Compatibility Level, Execution Plan, SQL Scripts
1 Comment

A fair test of row mode vs batch mode changes only the execution mode. This post uses a query hint to force row mode at the same compatibility level, checks that both modes return the same rows, and times five runs of each on a three million row table. It also shows a query where batch mode gains nothing.

Continue Reading
Nov20

Finding Regressed Queries in Query Store After a Deployment

Pinal Dave
SQL Performance
Execution Plan, Query Store, SQL CPU, SQL Server
No Comments

Find regressed queries in Query Store using weighted before-and-after duration and CPU, then compare plans and changed procedure text.

Continue Reading
Nov19

Granting Read Access to One Schema With GRANT SELECT ON SCHEMA

Pinal Dave
SQL Tips and Tricks
Schema, SQL Login, SQL Server, SQL Server Security
No Comments

Use GRANT SELECT ON SCHEMA for focused read access, test a loginless user, and check ownership chains and table-level DENY behavior.

Continue Reading
Previous 1 … 138 139 140 141 142 143 144 … 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