Launch week: the Season Pass & Fundamentals Week are 50% off — ends in 19d 15h 52mSee the sale

Author: Erik Darling

Restoring tempdb since GETDATE(). Now blogging at ErikDarlingData.com.
Production DBA

Trainable SQL Servers

Funny thing
The human body is pretty good at adaptation. When you get sick or injured, your body responds and (most of the time) heals itself up. When you stress your body in a certain way, over time, your body will feel less stressed by the same level of that activity. If you do 10 push-ups every day, after a week you'll barely notice you're doing them.

Read more about Trainable SQL Servers 7 comments — Join the discussion
T-SQL & Development

Don’t Use Scalar Functions in Views.

The short story: if your view has a scalar user-defined function it it, any query that calls the view will go single-threaded, even if the query doesn't reference the scalar function. Now for the long story.

Quite often people will inherit and rely on views written back in the dark ages, before people were aware of the deleterious effects that scalar valued functions can have on performance.

Read more about Don’t Use Scalar Functions in Views. 3 comments — Join the discussion
Performance Tuning

What Do You Want to See in a Free Query Store Tool?

I love Query Plans
No seriously, I love digging into query plans. Even writing XQuery to dig into them in sp_BlitzCache. I was both honored and horrified to take over development of it from Jeremiah.

It's a beast, but it's my kind of beast. At around 4500 lines of code, when you want to make a change, well, &^%$ happens sometimes.
It used to make sense

Read more about What Do You Want to See in a Free Query Store Tool? 7 comments — Join the discussion