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 an unmarked glass rain gauge on a wooden garden post with a vermilion float inside it and a small watering can at its foot

AUTO_UPDATE_STATISTICS_ASYNC Fixes WAIT_ON_SYNC_STATISTICS_REFRESH

January 23, 2020
Pinal Dave
SQL Performance
SQL Server, SQL Server Management Studio, SQL Statistics, SQL Wait Stats

AUTO_UPDATE_STATISTICS_ASYNC is the setting that cleared a new wait type, WAIT_ON_SYNC_STATISTICS_REFRESH, for my client. With auto update statistics on and stale statistics, the query halts while the statistics update. Switching the update to asynchronous removed the wait.

Read More
Gouache painting of a mountain stream blocked by one large vermilion stone with water backing up behind it

Session Wait Stats: Find the Query Behind a Wait Type

October 26, 2019
Pinal Dave
SQL Performance
SQL DMV, SQL Scripts, SQL Server, SQL Wait Stats

Session wait stats tell you which session produced a wait type, and the input buffer tells you which query that session ran. This post shows how to see who waits right now, how to read the wait history of each session, and how to join them to the query text. It also explains the THREADPOOL wait.

Read More
Gouache painting of a curved line of wooden dominoes on a table with a single vermilion block lying across their path

RSFXDEVICEOPS Wait: Unneeded WAITFOR DELAY Slowing Queries

October 5, 2019
Pinal Dave
SQL Performance
Comprehensive Database Performance Health Check, Filestream, SQL Server, SQL Wait Stats

The RSFXDEVICEOPS wait, listed as PREEMPTIVE_OS_RSFXDEVICEOPS, was high at a client that did not use FileStream. Their queries carried a WAITFOR DELAY nobody remembered adding. When the clause came out, the wait dropped and the queries got fast again.

Read More
Gouache painting of a drafting table with one rolled blueprint held flat by a vermilion clamp while a basket of other rolled blueprints waits beside it

RESOURCE_SEMAPHORE_QUERY_COMPILE Wait: Check Lock Pages in Memory

September 17, 2019
Pinal Dave
SQL Performance
SQL Memory, SQL Scripts, SQL Server, SQL Wait Stats

RESOURCE_SEMAPHORE_QUERY_COMPILE was the first wait type in a client’s wait statistics. Readers asked how I knew to look at Lock Pages in Memory. Here is the script I used, and the setting that resolved the problem.

Read More
Gouache painting of a garden hose with a kink held by a vermilion clip and a sputtering sprinkler beyond

Query Runs Slow Occasionally: Five Checks to Find Why

September 7, 2019
Pinal Dave
SQL Performance
Maintenance Plan, SQL Lock, SQL Scripts, SQL TempDB, SQL Wait Stats

When a query runs slow occasionally, the cause sits around the query: a lock, a job, a file growth, tempdb or a shortage of worker threads. This post gives one tested T-SQL check for each and a small demo for blocking and file growth. It also says what to do when all five checks find nothing.

Read More
Gouache painting of a single millstone with a line of grain sacks waiting and the first sack in vermilion

Signal Waits: Detect CPU Pressure With Wait Statistics

August 12, 2019
Pinal Dave
SQL Performance
SQL CPU, SQL DMV, SQL Scripts, SQL Wait Stats

Signal waits are the part of every wait that a task spends in the queue for a free CPU. This post ranks the wait types by signal time, shows why timer waits ruin the total share, and samples the signal share into a small table so a whole working day can be read interval by interval.

Read More
Gouache painting of a water mill with a raised sluice gate and a vermilion wheel to lift it

THREADPOOL Waits: When Raising Max Worker Count Helps

August 9, 2019
Pinal Dave
SQL Performance
SQL CPU, SQL DMV, SQL Server Configuration, SQL Wait Stats

THREADPOOL waits mean tasks waited for a worker thread. Five read-only queries separate real thread starvation from blocking and busy CPUs. The post lists five signs and shows how to raise the cap in small steps.

Read More
Previous 1 2 3 4 5 6 7 8 … 17 Next
  • Books
  • Testimonials
  • Privacy Policy

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