XML is unavoidable in SQL Server because query plans, extended events and maintenance plans all use it, while JSON support only arrived in 2016.
Category: Office Hours
Live SQL Server Q&A! (December 16, 2019)
Use a bigint identity column instead of GUIDs, because you will not run out of bigints and GUIDs force awkward index choices.
Live SQL Server Q&A! (October 17, 2019)
In-memory OLTP is good for loading and modifying data fast without blocking, but adding RAM usually beats pinning tables and taking on the technical debt.
Live SQL Server Q&A! (September 26, 2019)
Version upgrades often make performance worse, and the new cardinality estimator is a frequent suspect, so test each query under both estimators.
Live SQL Server Q&A! (September 19, 2019)
There is one query plan but two versions of it: the pre-execution showplan (estimated) and the post-execution showplan, which carries actual metrics, wait…
Live SQL Server Q&A! (September 12, 2019)
Ten indexes on one table is not proof of a problem, and you should build a case from what the server records before asking anyone to change them.
Live SQL Server Q&A! (September 5, 2019)
The partitioning column must be in the index key if you want partition elimination, which is the only meaningful performance gain partitioning offers.
Live SQL Server Q&A! (July 26, 2019)
Table spools usually appear on the inner side of nested loops because SQL Server fears repeating work for duplicate outer values, often from non-sargable…
Live SQL Server Q&A! (July 18, 2019)
A large SQL optimizer memory clerk in sys.dm_os_memory_clerks means query memory grants are taking memory from the buffer pool, which is real memory…
Live SQL Server Q&A! (July 11, 2019)
Index audits should clear out dead weight before adding anything. I run sp_BlitzIndex in mode 0 or mode 4, drop unused indexes with heavy writes first…
Live SQL Server Q&A! (July 4, 2019)
Sizing a SQL Server VM by core count alone causes both licensing waste and performance problems.
Live SQL Server Q&A! (June 27, 2019)
Entity Framework queries select every column of every table, which produces memory grants of nine, 10 and sometimes 15 GB when only about 128 MB gets used.
Live SQL Server Q&A! (June 13, 2019)
SQL Server 2019 batch mode memory grant feedback, adaptive joins and scalar UDF inlining all need compatibility level 150, which also brings the new…
Live SQL Server Q&A! (June 6, 2019)
In-memory OLTP is not a drop-in replacement for temp tables, and I have seen it work only for very fast ingestion of short-lived data, such as online…
Last Week’s Almost Definitely Not Office Hours: May 3
Local variables in a WHERE clause cause row overestimates that can lead to page level locks, while OPTION (RECOMPILE) or a proper parameter gives the right…
Read the post: Last Week’s Almost Definitely Not Office Hours: May 3
Last Week’s Almost Definitely Not Office Hours: April 19
Last week’s thrilling, stunning, flawless episode of whatever-you-wanna-call-it.
Read the post: Last Week’s Almost Definitely Not Office Hours: April 19
Last Week’s Almost Definitely Not Office Hours: April 12
Lock pages in memory and a minimum server memory setting both cause trouble when a VM host is overcommitted and the memory balloon driver misbehaves.
Read the post: Last Week’s Almost Definitely Not Office Hours: April 12
Last Week’s Almost Definitely Not Office Hours: April 5
Cascading foreign key actions without supporting indexes cause deadlocks, because each cascading delete hides a large clustered index scan.
Read the post: Last Week’s Almost Definitely Not Office Hours: April 5
Last Week’s Almost Definitely Not Office Hours: March 29
Last Week’s Almost Definitely Not Office Hours: March 29: a SQL Server video lesson from Erik Darling of Darling Data.
Read the post: Last Week’s Almost Definitely Not Office Hours: March 29
Last Week’s Almost Definitely Not Office Hours: March 22
An Enterprise Edition instance stuck at a 20 CPU limit has the wrong install media, and the fix is a SKU upgrade to the core-based licensing media, not an…
Read the post: Last Week’s Almost Definitely Not Office Hours: March 22
Last Week’s Almost Definitely Not Office Hours: March 15
Eager index spools are the strongest sign of inadequate indexing, because SQL Server builds an index in the plan on every execution, single threaded.
Read the post: Last Week’s Almost Definitely Not Office Hours: March 15
Last Week’s Almost Definitely Not Office Hours: March 8
Last week’s thrilling, stunning, flawless episode of whatever-you-wanna-call-it.
Read the post: Last Week’s Almost Definitely Not Office Hours: March 8
Last Week’s Almost Definitely Not Office Hours: March 1
Last week’s thrilling, stunning, flawless episode of whatever-you-wanna-call-it.
Read the post: Last Week’s Almost Definitely Not Office Hours: March 1
Last Week’s Almost Definitely Not Office Hours: February 22
A query with a very long IN list can make the optimizer report that the query processor ran out of internal resources, and the fix is to load the values…
Read the post: Last Week’s Almost Definitely Not Office Hours: February 22
Join Me For Free SQL Server Q&A Every Friday At Noon!
Every Friday at Noon EST, I answer your SQL Server questions live on YouTube.
Read the post: Join Me For Free SQL Server Q&A Every Friday At Noon!



















