SQL Server

Office Hours Podcast

[Video] Office Hours 2018/8/1 (With Transcriptions)

SQL Server, Videos
0
This week, Erik and Richie discuss monitoring tools, finding all unused tables across databases, query tuning, deleting vs hanging on to indexes, sharding databases, query editors, aggressively-locked indexes, why a plan would not be in the plan cache, and Richie’s current housing situation. Here’s the video on YouTube: You can register to attend next week’s Office Hours,…
Read More

A New tempdb Trace Flag Appears!

SQL Server
19 Comments
Coming Around Microsoft has been doing a good job of taking stuff that used to be Wizard Hat and making it part of out of the box functionality. Starting with SQL Server 2016, you didn’t need to keep these in your setup checklist: Trace flag 1118 to reduce SGAM contention Trace flag 1117 so when…
Read More

#TSQL2sday: +

SQL Server
5 Comments
For this month’s T-SQL Tuesday, He of Perfect Hair, Bert Wagner asked, “What code have you written that you would hate to live without?” There are a lot of pieces of code I frequently need to reuse when working on the First Responder Kit, like string splitting, XML PATH-ing, and converting milliseconds to some human…
Read More

SQL Server Setup Feature List Changes 2008-2017

SQL Server
4 Comments
If you happen to install several SQL Servers in a row, you’ll notice differences from over the years in the feature list. SQL Server 2008 Ah, a simpler time. When you got to the feature selection screen, here were your choices: SQL Server 2008 feature selection In case you’ve forgotten, Business Intelligence Development Studio (BIDS)…
Read More

A Strange Place For A Memory Grant

If You Hang Around Fetish Bars Long Enough… You learn things about memory grants in execution plans. Stuff like the things that usually need memory Hash Join Hash Match Sort Parallelism Exchanges But there’s something that rarely gets discussed, even in the deepest, darkest, dankest dungeons. Let’s loosen the clamps and look at it. Keys…
Read More

Where Clustered Index Keys Dare

Colonel Clustered We’ve blogged a couple times about how clustered index key columns get stored in your nonclustered indexes: here and here. But where they get stored is a matter of weird SQL trivia. You see, it depends on how you define your nonclustered index. “It Depends” We all scream for dependencies! Hooray! If you…
Read More

When Query Plans Lie Part 2

Getting Weirder In Part 1, we looked at how query plans can tell us little lies. Now we’re going to look at how those little lies can turn into bigger lies. Adding An Index Right now, this is our query: Transact-SQL SELECT u.UpVotes, u.DownVotes FROM dbo.Users AS u WHERE u.Reputation >= 100000; 123 SELECT u.UpVotes,…
Read More

Parameter Fluid Optimization

SQL Server
0
Optimizer Studies I don’t have a real job, which means that if something strikes my fancy, like staring at a spot on the wall for an hour, I can do it. Occasionally things are a bit more inspired, and so I go poking around what SMRT PPL might be up to. All you nice people…
Read More

So You Wanna Debug SQL Server Part 2

SQL Server
2 Comments
Birth Control Debugging, and, heck, even learning about debugging, is a time-consuming and often unhelpful process when it comes to tracking down issues in SQL Server. It is arduous and tedious, and yields little chance of making you any friends. So why write about it? Mostly because no one else is willing to — at…
Read More

So You Wanna Debug SQL Server Part 1

SQL Server
5 Comments
Start here! This is a gentle introduction to getting set up and started. I’m nowhere near as good at this as I want to be, but I’ve been inspired by a couple wizards: Bob the Ward and Paul the White. The first thing you need to do is go download WinDbg (or the debugger of your…
Read More