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
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 full clothes airer, with the overflow of wet laundry draped over chairs and a radiator

Finding Queries That Spill With total_spills in Query Stats

October 25, 2022
Pinal Dave
SQL Performance
SQL DMV, SQL Memory, SQL Performance, SQL Server, SQL TempDB

Rank total_spills and recent counters, inspect plans, compare Query Store tempdb use, and investigate estimates before increasing grants.

Read More
A glassblower turning a half-formed glowing vase on a blowpipe, finished vases cooling on a shelf behind

Live Plans for Running Queries With sys.dm_exec_query_statistics_xml

June 23, 2022
Pinal Dave
SQL Performance
Execution Plan, SQL DMV, SQL Server, SQL Wait Stats

Read sys.dm_exec_query_statistics_xml for live plans, compare profile counts with estimates, and interpret partial progress carefully.

Read More
File Latency

Find Database File Latency – SQL in Sixty Seconds #198

June 15, 2022
Pinal Dave
SQL Video
SQL Data Storage, SQL DMV, SQL in Sixty Seconds, SQL Performance

Lots of people asked me to create a video on my earlier blog post SQL SERVER – Script to List Database File Latency. Here is the video.

Read More
Gouache painting of three hourglasses side by side, the first with grey sand and the other two with vermilion sand

Database File Latency: Read and Write Stalls per IO

June 7, 2022
Pinal Dave
SQL Performance
Disk, SQL DMV, SQL Performance, SQL Scripts

Database file latency is the stall time per read or write. This post divides the IO stall columns by the call counts for every file, explains the zero queued columns and says when a number is worth acting on.

Read More
Gouache painting of five wooden spoons standing in a jar, the tallest with a reddish vermilion-stained bowl and handle

Reads and Writes per File: Rank Files by Bytes Moved

January 4, 2022
Pinal Dave
SQL Tips and Tricks
SQL Data Storage, SQL DMV, SQL Performance

Reads and writes per file show which data or log file SQL Server uses the most. This post ranks the files of a demo database by bytes moved with sys.dm_io_virtual_file_stats and explains what the tally can and cannot tell you.

Read More
Gouache painting of a turning waterwheel at a mill while a vermilion wheelbarrow of grain climbs a long ramp

CPU Scheduler Waiting on Disk: Read Pending Disk IO

September 21, 2021
Pinal Dave
SQL Performance
SQL CPU, SQL DMV, SQL Scripts, SQL Server

A CPU scheduler waiting on disk shows pending disk IO on its scheduler. This post reads sys.dm_os_schedulers once and in a short sampling loop, then confirms the result with file latency.

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

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