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
An execution plan showing SELECT, Top and Index Scan, all carrying 17 rows with no warnings, beside a properties panel where Estimated Rows Read says 25 and Actual Rows Read says 5,000,000

AI Execution Plan Analysis: I Gave It My Plan and Asked What Was Wrong

September 16, 2026
Pinal Dave
SQL Performance
Parameter Sniffing, Recompile, SQL Statistics

I handed AI a plan with no warnings and healthy numbers, yet it read five million rows to return seventeen. That is the real test of AI execution plan analysis.

Read More
Parameter Sensitive

Parameter Sensitive Plan optimization in SQL Server 2022 – SQL in Sixty Seconds #200

May 16, 2023
Pinal Dave
SQL Video
Execution Plan, Parameter Sniffing, SQL in Sixty Seconds, SQL Performance

SQL Server 2022 introduces Parameter Sensitive Plan Optimization (PSPO), a feature that revolutionizes the performance of parameterized queries.

Read More
Gouache painting of a lump of dough beside three baking tins of different sizes, the medium one vermilion

PSPO Plan Variants: One Query, Several Plans in SQL Server

May 15, 2023
Pinal Dave
SQL Performance
Execution Plan, Parameter Sniffing, SQL DMV, SQL Server 2022

PSPO plan variants let SQL Server cache up to three plans for one parameterized query when the data is very skewed. This post builds a skewed table, shows two variants with different reads for three calls, compares the same calls with the feature off, and explains when PSPO does not apply.

Read More
A specialized jig and a generic guide are compared against differently shaped workpieces.

SQL SERVER – Parameter Sniffing and Bad Plan

August 5, 2021
Pinal Dave
SQL Performance
Parameter Sniffing, Query Hint, SQL Scripts, SQL Server

Disabling parameter sniffing does not guarantee that a bad plan becomes good. That remains my answer to the customer question.

Read More
Gouache painting of a row of six clay cups on a windowsill in blue, pink, cream, sage and vermilion

sys.dm_exec_valid_use_hints: Every USE HINT Your Server Knows

April 13, 2021
Pinal Dave
SQL Performance
Parameter Sniffing, Query Hint, SQL DMV, SQL Scripts

sys.dm_exec_valid_use_hints lists every USE HINT name that your SQL Server accepts. This post groups the 35 names on SQL Server 2025 and shows the compile error for a misspelled hint. It applies two hints and reads the plan to prove each one worked, then compares USE HINT with QUERYTRACEON.

Read More
Gouache painting of a trail post with three arrow pointers, one of them vermilion

Multiple OPTIMIZE FOR Hints in One Query: Value or UNKNOWN

November 6, 2020
Pinal Dave
SQL Performance
Execution Plan, Parameter Sniffing, Query Hint, SQL Scripts

Multiple OPTIMIZE FOR hints in one query are written as one list: each parameter gets its own value or UNKNOWN. This post compiles the same query six ways, reads the compile values and estimated rows from the plan cache, and shows which combinations SQL Server accepts.

Read More
A workshop bench holds materials and a small chair being worked on temporarily

What is Stored in TempDB? – Interview Question of the Week #271

April 5, 2020
Pinal Dave
SQL Interview Questions and Answers
Parameter Sniffing, SQL Scripts, SQL TempDB

Question: What is Stored in TempDB?
Answer: In my recent conversation my client asked me if I know what is currently stored in their TempDb.

Read More
1 2 3 4 5 Next
  • Books
  • Testimonials
  • Privacy Policy

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