Author: Kendra Little

My goal is for you to understand your SQL Server’s behavior– and learn how to change it. When I’m not figuring out the solutions to your database problems, you’ll find me at user group meetings in Portland, Oregon. I also love to draw.

SQL Server 2012 SP3 Adds Memory Grant and Performance Features

SQL Server 2012 SP3 has just been freshly released! Not only does this release contain bug fixes, it also contains a slew of performance tuning related features.

Many of these features are about memory grants. This is NOT the memory used in the buffer pool/ data cache by the query -- it's the memory also known as Query Workspace Memory. Start reading more here.

Read more about SQL Server 2012 SP3 Adds Memory Grant and Performance Features 9 comments — Join the discussion

Training Plan for a SysAdmin to Manage Availability Groups

How hard is it for a systems administrator who's used to running SQL Server on Windows Clusters to tackle Availability Groups? Our example system administrator knows a bit of TSQL and their way around Management Studio, but is pretty new to performance tuning. Well, it might be harder than you think. First, let's look at…

Read more about Training Plan for a SysAdmin to Manage Availability Groups 4 comments — Join the discussion
Performance Tuning

Does Creating an Indexed View Require Exclusive Locks on an Underlying Table?

An interesting question came up in our SQL Server Performance Tuning course in Chicago: when creating an indexed view, does it require an exclusive lock on the underlying table or tables? Let's test it out with a simple indexed view run against a non-production environment. (AKA, a VM on my laptop running SQL Server 2014.)…

Read more about Does Creating an Indexed View Require Exclusive Locks on an Underlying Table? Be the first to comment

The Easiest Way to Restore Transaction Logs to A Point In Time (Spoiler: Use AmazonRDS)

... is to use a SQL Server where a robot does it for you! Let's take a look at how you can do this in AmazonRDS's hosted SQL Server these days.  Normally, restoring transaction logs is super tedious. You've got to restore all the files in the right order, for every single database. Even if…

Read more about The Easiest Way to Restore Transaction Logs to A Point In Time (Spoiler: Use AmazonRDS) 28 comments — Join the discussion

Pull Request 101 for DBAs Using GitHub

I've worked with source control quite a bit over the years -- everything from ye olde Visual Source Safe to Subversion to TFS. I even supported the Source Depot system at Microsoft as an engineer for a year back in the day!

These days I don't use source control a ton. We keep repositories of scripts in GitHub to help manage our scripts as a team, but I don't really use it often enough to learn the command line well.

Read more about Pull Request 101 for DBAs Using GitHub 8 comments — Join the discussion
T-SQL & Development

Replication Won’t Refresh Your Dev and Pre-Production Environments

At first glance, SQL Server's transactional replication seems like it's useful for moving data around in all sorts of situations: it works in Standard Edition, it's not synchronous, and you can have multiple subscribers.

Why People Want Replication to Test and Pre-Production Environments

Read more about Replication Won’t Refresh Your Dev and Pre-Production Environments 20 comments — Join the discussion
Production DBA

Why Zero Data Loss in SQL Server is Harder Than You Think

But Kendra, it can't be that hard... after all, we have synchronous modes in Database Mirroring and Availability Groups, right?
Synchronous Commit doesn't mean "zero data loss"
When we think about limiting data loss, the first thing we think of is a technology that lets us reduce points of failure. If every transaction must be written to two separate storage systems, we have a pretty good chance to have no data loss, right?

Read more about Why Zero Data Loss in SQL Server is Harder Than You Think 3 comments — Join the discussion
Performance Tuning

When does a Query Get Trivial Optimization?

We had some great questions about trivial execution plans in SQL Server in our Advanced Querying and Indexing class a few weeks ago. Here's a little glimpse into what we talked about.

For really simple queries, SQL Server can use "trivial optimization". If there's a very limited number of ways to run the query, why do a bunch of fancy, CPU burning cost-based optimization? Just chuck the plan at the query and let it go!

Read more about When does a Query Get Trivial Optimization? 6 comments — Join the discussion
Performance Tuning

Staging Data: Locking Danger with ALTER SCHEMA TRANSFER

Developers have struggled with a problem for a long time: how do I load up a new table, then quickly switch it in and replace it, to make it visible to users?

There's a few different approaches to reloading data and switching it in, and unfortunately most of them have big problems involving locking. One method is this:

Read more about Staging Data: Locking Danger with ALTER SCHEMA TRANSFER 16 comments — Join the discussion
Performance Tuning

Are Index ‘Included’ Columns in Your Multi-Column Statistics?

When you create an index in SQL Server with multiple columns, behind the scenes it creates a related multi-column statistic for the index. This statistic gives SQL Server some information about the relationship between the columns that it can use for row estimates when running queries.

But what if you use 'included' columns in the index? Do they get information recorded in the statistics?

Read more about Are Index ‘Included’ Columns in Your Multi-Column Statistics? 3 comments — Join the discussion
Performance Tuning

Can DBCC SHRINKFILE Cause Blocking in SQL Server?

It sure can.

The lock risks of shrinking data files in SQL Server aren't very well documented. Many people have written about shrinking files being a bad regular practice-- and that's totally true. But sometimes you may need to run a one-time operation if you've been able to clear out or archive a lot of data. And you might wonder what kind of pains shrinking could cause you.

Read more about Can DBCC SHRINKFILE Cause Blocking in SQL Server? 40 comments — Join the discussion