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.

RAM and Sympathy

With the release date for 2016 finally announced Everyone can start gearing up to gaze upon its far shores from the 2008R2 instance they can't or won't upgrade for various reasons. I'm excited for a lot of the improvements and enhancements coming along, and generally hope I'm wrong about customer adoption. One annoyance with the…

Read more about RAM and Sympathy 16 comments — Join the discussion

One weird trick for managing a bunch of servers

Let's face it, most people don't have just one SQL Server
How many they tell Microsoft they have is another matter, but let the record show that I don't condone licensing dishonesty. But going one step further, most places... Well, they're 'lucky' if they have one DBA, never mind a team.

Everyone else: Give me your network people, your sysadmin, your huddled SAN group yearning to breathe free, the wretched refuse of your teeming developers.

Read more about One weird trick for managing a bunch of servers 41 comments — Join the discussion

A quick tip for working with large scripts in SSMS

Sometimes great things stare you in the face for years
Sometimes they stare at you for so long that you stop noticing them. This isn't a romdramadey tag line. There are just so many buttons to push. Sometimes pressing them is a horrible idea and it breaks everything. I lose my mind every time I go to move a tab and I end up undocking a window. This won't save you from that, but it will at least save your mouse scroll wheel.

Read more about A quick tip for working with large scripts in SSMS 7 comments — Join the discussion

Stats Week: Only Updating Statistics With Ola Hallengren’s Scripts

I hate rebuilding indexes
There. I said it. It's not fun. I don't care all that much for reorgs, either. They're less intrusive, but man, that LOB compaction stuff can really be time consuming. What I do like is updating statistics. Doing that can be the kick in the bad plan pants that you need to get things running smoothly again.

Read more about Stats Week: Only Updating Statistics With Ola Hallengren’s Scripts 46 comments — Join the discussion
Performance Tuning

Stats Week: Do Query Predicates Affect Histogram Step Creation?

Auto Create Statistics is your friend
It's not perfect, but 99% of the time I'd rather have imperfect statistics than no statistics. This question struck me as interesting, because the optimizer will totally sniff parameters to compile an initial plan. If you don't have index statistics, or system statistics already on a column in a WHERE clause, SQL is generally kind enough to create a statistics object for you when the query is compiled.

Read more about Stats Week: Do Query Predicates Affect Histogram Step Creation? 2 comments — Join the discussion

Stats Week: Statistics Terminology Cheatsheet

These things used to confuse me so much
Despite having worked at a Market Research company for a while, I know nothing about statistics, other than that project managers have all sorts of disagreeably subjective phrases for describing them. Vast majority, convincing plurality, dwindling minority, et al. Less talky, more picture.

When I started getting into SQL Server, and learning about statistics, I heard the same phrases over and over again, but wasn't exactly sure what they meant.

Read more about Stats Week: Statistics Terminology Cheatsheet 7 comments — Join the discussion

Old and Busted: DBCC Commands in 2016

I hate DBCC Commands
Not what they do, just that the syntax isn't consistent (do I need quotes around this string or not?), the results are a distraction to get into a usable table, and you need to write absurd loops to perform object-at-a-time data gathering. I'm not talking about running DBCC CHECKDB (necessarily), or turning on Trace Flags, or any cache-clearing commands -- you know, things that perform actions -- I mean things that spit tabular results at you.

Read more about Old and Busted: DBCC Commands in 2016 3 comments — Join the discussion

Another Hidden Parallelism Killer: Scalar UDFs In Check Constraints

Every single time
Really. Every single time. It started off kind of funny. Scalar functions in queries: no parallelism. Scalar functions in computed columns: no parallelism, even if you're not selecting the computed column. Every time I think of a place where someone could stick a scalar function into some SQL, it ends up killing parallelism. Now it's just sad.

Read more about Another Hidden Parallelism Killer: Scalar UDFs In Check Constraints 15 comments — Join the discussion

Generating test data without complicated T-SQL

Sometimes you need garbage
Not because DBAs are the IT equivalent of Oscar the Grouch, but maybe you want to post a question on a forum, and you don't want to use your own data. At least, you probably shouldn't just post your own data without masking it. But masking data is annoying, and by the time you get everything in order, someone's breathing down your neck for an answer.

Read more about Generating test data without complicated T-SQL 7 comments — Join the discussion