At a recent Charlotte SQL Server Users Group meeting, one member asked what’s the difference between locking and blocking. I figured I’d cover that today. Locking When you work in your database, you’re not alone. There are other users connected hitting the same database as you, the same tables as you. You have to share…
Category: Microsoft SQL
SQL 202-Interpreting your Execution Plan
OK, I’ve explained how you can see the execution plan for your query (either the actual or the estimated). So now you can see your plan…Now what? What do you want to look for? Here’s the plan for the query I was running when I started this post. I was looking at the IO statistics…
SQL 202-Indexes with WHERE clauses
So I have this table in my new database that is used as the base table for more than 50% of the queries that are run on my server. It’s our product table. Along with all the basic information about products there’s a column that hold the status of that product, it’s either active or…
SQL 202-Covered Indexes
By this point you should feel pretty comfortable with what an INDEX is and what it does for your queries. Basically it provides the server to find your data rows more quickly by creating a look-up to find key values. When teaching indexes I usually open the book closest to me, and show them the…
SQL 202-Theoretical Exection Orders
When you send a query to the server, there’s an order to the steps the server will take to retrieve the data you’re looking for. It’s important to have an understanding on what order those steps are, so you know where to start making changes in order to minimize the time it takes to optimize…
Checking for Computed Columns
So I’ve been building an auditing system for my new employer that will help track all the changes to the data. Right now, some changes could be made, and we wouldn’t be able to tell who made the change, or when the change was made. I had an “Ah-ha” moment pretty early on. “Let’s use…
SQL 202-Performance Tuning
Honestly, choosing which level to put this content under was one of the harder decisions I had to make when putting this content together. Before you get into this stuff, You need to understand queries pretty well. You should also have the fundamentals on what an index is, and how to manage them (add, alter,…
Product Review: DTS xChange
Late last week I was informed our new servers would be available January 3, and I should be ready to set up my new SQL 2008R2 two-node cluster. I can’t begin to tell you how excited I am about this project! I’d already downloaded the latest backups for my databases, and restored them to my…
SQL 402:Deprecation in SQL Server
Last week at the Charlotte SQL Server User Group, Aaron Bertrand covered What’s New in Denali. During that presentation he mentioned a few of the things that would not be supported in Denali. That got me thinking. I know there are techniques I’ve used that are no longer supported. I made my self a task…
Types of Optimization
One of the things I love most about my current position is the fundamental shift in the types of optimization I’m doing. Early on in my career I was concentrating on queries that would run once an hour, and cover thousands, sometimes tens of thousands of records per hour. I think that’s a great place…