Ever since SSMS started collecting wait stats in query plans, I’ve been mad about a couple things that get filtered out:
Read the post: Please Stop Ignoring CXCONSUMER Waits In SQL Server
AI Training for Database Teams and SQL Server Performance Tuning
Ever since SSMS started collecting wait stats in query plans, I’ve been mad about a couple things that get filtered out:
Read the post: Please Stop Ignoring CXCONSUMER Waits In SQL Server
Yesterday we looked at where table variables can have a surprising! impact on performance. We’ll talk more about them later, because that’s not the only…
Read the post: Starting SQL: Why Your SQL Server Query Can’t Go Parallel, Scalar Functions Edition
Some waits relate, but nearly all waits can be compensated for.
Read the post: Starting SQL: Compensating For CPU Waits In SQL Server
One of our SQL Server workloads runs many concurrent parallel queries on a possibly already busy server.
I got asked recently if there’s a way to find parallel queries that are potentially skewed.
Read the post: Detecting Parallel Query Plan Performance Issues In Query Store
A local static cursor is my preferred cursor option because a fast forward cursor forces the entire query to run serially, while local static leaves the…
Read the post: My Favorite SQL Server Cursor Options: Local Static
A cached execution plan hides the parallelism problems that actually made a query slow, including skewed repartition streams exchanges.
Read the post: Signs Your SQL Server Execution Plan Is Lying To You: Repartition Streams
Signs Your SQL Server Execution Plan Is Lying To You: Exchange Spills: a SQL Server video lesson from Erik Darling of Darling Data.
Read the post: Signs Your SQL Server Execution Plan Is Lying To You: Exchange Spills
I see people using OUTPUT to audit modifications from time to time, often because “triggers are bad” or “triggers are slow”.
Read the post: An Unfortunate Performance Side Effect Of The OUTPUT Clause In SQL Server
There are lots of great options out there for figuring out what’s happening on a server. If you’re the kind of person still running sp_who, or sp_who2, or…
Read the post: Quickly Detecting CPU and Memory Pressure On A SQL Server With sp_PressureDetector
How Table Variables Prevent SQL Server From Using A Parallel Query Plan: a SQL Server video lesson from Erik Darling of Darling Data.
Read the post: How Table Variables Prevent SQL Server From Using A Parallel Query Plan
This was originally posted as an answer by me here, I’m re-posting it locally for posterity
Read the post: In SQL Server, Does Query Parallelism Change Query Memory Grants?
There are a lot of good reasons to use tablock on your inserts, as long as you can handle the reduced concurrency of a table level lock.
Read the post: How TABLOCK Hints Can Hurt Column Store Insert Performance
This is a somewhat complicated topic. There’s not a great TL;DR here, but I don’t want anyone to walk away from this post thinking that parallelism or…
Read the post: Why Spills In SQL Server Parallel Plans Can Hurt Performance
In dramatic fashion, I’m revisiting something from this post about stats updates.
Read the post: Why Does My Serial Query Plan Have Parallel Wait Stats Like CXPACKET And CXCONSUMER?
After a while tuning a query, sometimes it’s fun to mess with the DOP it’s run at to see how things change.
Read the post: How Changing Max Degree Of Parallelism Can Change Query Plans In SQL Server
For some background on Exchange Spills, check out this Great Post™ by Joe.
Read the post: Spills Week: How Exchange Spills In Parallel Query Plans Crush Query Performance
One of the many current downsides of @table variables is that modifying them inhibits parallelism, which is a problem #temp tables don’t have.
When you’re measuring query changes to see if your performance changes have made a difference, a common way to do that is to use STATISTICS TIME and IO.
There’s a pinky-out saying about wine: don’t hate the grape.
Read the post: Too Much Of A Harmless SQL Server Wait Type Can Be Harmful
A scalar valued function in a query's select list forces the whole plan to run serially, and dumping the heavy query into a temp table first lets you apply…
Read the post: A Trick For Working Around Scalar UDF Performance Issues In SQL Server
Query Store, not the plan cache, caused the CMEMTHREAD waits I blamed on the plan cache in an earlier video.
Read the post: CMEMTHREAD Waits Generated By Query Store In SQL Server
Microsoft recently published new guidance on setting server level MAXDOP. I hope to help the community by analyzing the new guidance and offering some of…
Read the post: Thoughts On Setting MAXDOP Correctly In SQL Server
In the last post, I showed you a query where a bad plan was chosen because of bad guesses.
Read the post: How Bad Cardinality Estimates Lead To Bad Query Plan Choices: Does Batch Mode Help?
When you’re reading query plans, you can be faced with an overwhelming amount of information, and some of it is only circumstantially helpful.
Read the post: SQL Server Query Plan Operators That Hide Performance Problems
Copyright © 2019-2026 Darling Data