You know all those pesky developer myths that never go away?
Category: SQL Server 2019
How SQL Server 2019 Helps You Find Queries That Have Missing Index Requests
In the quest for me trying to get people to upgrade to a not-old-and-busted version of SQL Server, this is one that I talk about a lot because it really…
Read the post: How SQL Server 2019 Helps You Find Queries That Have Missing Index Requests
Unkillable Sessions and Undetected Deadlocks
I recently experienced a blocking issue in a production environment which had been going on for hours.
Why Some Types of Parallel Scans can be Slow on Cloud Storage
Upon reading the title, you may be thinking that of course parallel scans will be slow in the cloud. Cloud storage storage simply isn’t very fast.
Read the post: Why Some Types of Parallel Scans can be Slow on Cloud Storage
Using Batch Mode for the “Matching Supply With Demand” Challenge
Itzik Ben-Gan posted an interesting T-SQL challenge on SQL performance dot com. I’m writing up my solution in my own blog post because I have a lot to say…
Read the post: Using Batch Mode for the “Matching Supply With Demand” Challenge
Blocking on Columnstore Indexes that RCSI and NOLOCK Don’t Resolve
I recently ran into a production issue where a SELECT query that referenced a NOLOCK-hinted table was hitting a 30 second query timeout.
Read the post: Blocking on Columnstore Indexes that RCSI and NOLOCK Don’t Resolve
UDF Inlining And String Aggregations In SQL Server 2019
This post is really four different posts. Maybe five. The main points are:
Read the post: UDF Inlining And String Aggregations In SQL Server 2019
Rewriting Scalar UDFs For SQL Server 2019 Inlining
SQL Server 2019 has been a bit of a roller coaster ride. In particular, UDF inlining started as I think the most interesting addition to the product.
Read the post: Rewriting Scalar UDFs For SQL Server 2019 Inlining
Common Table Expressions Are Useful For Rewriting Scalar Functions In SQL Server
Common Table Expressions Are Useful For Rewriting Scalar Functions In SQL Server: a SQL Server video lesson from Erik Darling of Darling Data.
Read the post: Common Table Expressions Are Useful For Rewriting Scalar Functions In SQL Server
A Silent Bug With Clustered Column Store Indexes And Computed Columns In SQL Server 2019
This bug has been reported to the proper authorities, and this blog post is not to dunk on the Summer Intern responsible for column store indexes, but to…
How SQL Server 2019 Helps You Link Queries To Missing Index Requests
When dm_db_missing_index_group_stats_query got documented, I was really happy. After all, this has been a peeve of mine for ages.
Read the post: How SQL Server 2019 Helps You Link Queries To Missing Index Requests
A Bug With Recursive UDFs When Inlined In SQL Server 2019
I see people do things like this fairly often with UDFs. I don’t know why. It’s almost like they read a list of best practices and decided the opposite was…
Read the post: A Bug With Recursive UDFs When Inlined In SQL Server 2019
Spinlock Contention With Parallel Window Aggregates In SQL Server 2019
On SQL Server 2019 CU9, parallel batch mode window aggregates can run for tens of seconds because of heavy SOS_SUSPEND_QUEUE spinlock contention.
Read the post: Spinlock Contention With Parallel Window Aggregates In SQL Server 2019
Temporary Object Concurrency With In-Memory tempdb Metadata In SQL Server 2019
SQL Server 2019's memory-optimized tempdb metadata setting removes most of the temp table penalty under very high concurrency.
Read the post: Temporary Object Concurrency With In-Memory tempdb Metadata In SQL Server 2019
Database Context Is Everything In SQL Server
A query takes its optimizer behavior from the database context it runs in, not from the database it reads, so you can get batch mode on rowstore against a…
When Does Scalar UDF Inlining Work In SQL Server?
UPDATE: After writing this and finding the results fishy, I reported the behavior described below in “Somewhat Surprising” and “Reciprocal?” and it was…
Read the post: When Does Scalar UDF Inlining Work In SQL Server?
An Overlooked Benefit Of Batch Mode With Windowing Functions In SQL Server
If you ask people who tune queries why batch mode is often much more efficient with windowing functions, they’ll tell you about the window aggregate…
Read the post: An Overlooked Benefit Of Batch Mode With Windowing Functions In SQL Server
Batch Mode On Row Store vs Batch Mode Tricks For Performance Tuning SQL Server Queries
I think Batch Mode is quite spiffy for the right kind of query, but up until SQL Server 2019, we had to play some tricks to get it:
Streaming Week: Query Performance Weirdness In SQL Server 2019 With Batch Mode
Moving to compatibility level 150 can make a query slower, because SQL Server 2019 batch mode on rowstore turned a sort that took about a second in row…
Read the post: Streaming Week: Query Performance Weirdness In SQL Server 2019 With Batch Mode
SQL Server 2019: When Batch Mode On Rowstore Isn’t Better For Performance
Look, whenever you make changes to the optimizer, you’re gonna hit some regressions.
Read the post: SQL Server 2019: When Batch Mode On Rowstore Isn’t Better For Performance
Experiment With Table Variable Deferred Compilation Without SQL Server 2019
If you haven’t heard by now, Table Variables have some ✌features✌ that can cause performance issues pretty generally in SQL Server.
Read the post: Experiment With Table Variable Deferred Compilation Without SQL Server 2019
Query Tuning SQL Server 2019 Part 5: I’m Not Going Back
There was one thing that I didn’t talk about earlier in the week.
Read the post: Query Tuning SQL Server 2019 Part 5: I’m Not Going Back
Query Tuning SQL Server 2019 Part 4: Long Live The Query Tuner
Let’s talk about some common hints that people use to fix parameter sniffing:
Read the post: Query Tuning SQL Server 2019 Part 4: Long Live The Query Tuner
Query Tuning SQL Server 2019 Part 3: Who Died And Made You The Optimizer?
We’ve got a problem, Sam Houston. We’ve got a problem with a query that has some strange issues.
Read the post: Query Tuning SQL Server 2019 Part 3: Who Died And Made You The Optimizer?
Query Tuning SQL Server 2019 Part 2: Big Databases, Big Ideas
When I first wrote this demo, I called it dbo.ParameterSniffingMonstrosity.
Read the post: Query Tuning SQL Server 2019 Part 2: Big Databases, Big Ideas







