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
Jun20

Multiple Aggregates in One Query: Read the Table Once

Pinal Dave
SQL Performance
SQL Index, SQL Performance, SQL Scripts
No Comments

Multiple aggregates in one query read a table once, where separate subqueries read it again and again. This post measures the logical reads of two subqueries against one SELECT, uses CASE inside SUM for different filters, and shows two cases where the rewrite gains nothing or loses to an index.

Continue Reading
Jun19

LPIM Memory Model: Check It With sys.dm_os_sys_info

Pinal Dave
SQL Performance
SQL Memory, SQL Server Security, Starting SQL
No Comments

The LPIM memory model tells you whether SQL Server runs with locked pages. This post reads it from sys.dm_os_sys_info in one query, confirms it with the process memory view and the error log, and explains what each value means.

Continue Reading
Jun18

SQL SERVER – Queries Waiting for Memory Grant – Performance Tuning

Pinal Dave
SQL Performance
SQL Memory, SQL Server
1 Comment

Queries Waiting for memory grants give me evidence to investigate. A customer CTO requested that evidence before approving more RAM.

Continue Reading
Jun17

SQL Puzzle – IN and IS NOT NULL – Strange Results

Pinal Dave
SQL Puzzle
SQL NULL, SQL Scripts, SQL Server
117 Comments

Today, let us see a very simple puzzle where we are getting strange results when using NOT IN and IS NULL in a T-SQL query.

Continue Reading
Jun16

User Statistics Report in SSMS: Who Is Connected

Pinal Dave
SQL Tips and Tricks
SQL Reports, SQL Server Management Studio, SQL Server Security
No Comments

The User Statistics report in SSMS shows the users who are connected to a database. This post opens the report, answers the same question with a query over sys.dm_exec_sessions, and finds the one application that holds many sessions.

Continue Reading
Jun15

SSMS Command Line Options: Server, Database and Login

Pinal Dave
SQL Tips and Tricks
Command Line, SQL Command, SQL Server Management Studio
2 Comments

SSMS command line options open Management Studio already pointed at a server and a database. This post finds SSMS.exe, lists the switches that SSMS 22 documents in its own usage text, and shows how to turn them into a shortcut without saving a password.

Continue Reading
Jun14

How to Force Index on a SQL Server Query? – Interview Question of the Week #281

Pinal Dave
SQL Interview Questions and Answers
Clustered Index, Query Hint, SQL Index, SQL Scripts, SQL Server
3 Comments

Question: How to Force Index on a SQL Server Query?
Answer: I personally do not like to force an index on any query. Let us learn together.

Continue Reading
Previous 1 … 108 109 110 111 112 113 114 … 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