Category: DBA Training Plan

Production DBA

DBA Training Plan 17: Should You Partition Your Tables?

In the last episode, I talked about knowing when it's time to scale out: identifying when our data is getting to be so large that we have to split it across multiple servers, and I explained why that is so challenging. But what about table partitioning - SQL Server's ability to break up a single table into smaller ones on the same server?

Read more about DBA Training Plan 17: Should You Partition Your Tables? 11 comments — Join the discussion
Production DBA

DBA Training Plan 16: Is It Time to Scale Out?

In our last episode, we found out what your server was waiting on. In the closing remarks, I mentioned that you should find out which queries are causing the problem, and focus your mitigation efforts there. You might have circled back to the episode where we covered sp_BlitzCache, used a @SortOrder parameter that lines up with your top wait type, and...

Read more about DBA Training Plan 16: Is It Time to Scale Out? 12 comments — Join the discussion
Performance Tuning

DBA Training Plan 15: What’s Your SQL Server Waiting On?

You're here, dear reader, because you weren't "classically trained" as a database administrator. You didn't graduate from the University of Sciencing Computerses with a Master's of Transactional Processing.

You probably got your start as a developer or sysadmin, and gradually fumbled your way here. You're used to monitoring stuff from the OUTSIDE using things like perfmon counters or CPU graphs.

Read more about DBA Training Plan 15: What’s Your SQL Server Waiting On? 6 comments — Join the discussion
Performance Tuning

DBA Training Plan 13: Why Do Cached Plans Go Bad?

It's a little bit of a trick question: what could make a good query plan turn bad?

In the last episode, we used sp_BlitzCache to spot the most resource-intensive, longest-running query plans in your server's cache. Go run those queries again, right now, and I bet you're going to see plans in the cache that use parameters. Maybe they're stored procedures, or maybe they're parameterized SQL.

Read more about DBA Training Plan 13: Why Do Cached Plans Go Bad? 2 comments — Join the discussion
Performance Tuning

DBA Training Plan 12: What Query Plans Are In Cache?

In the last episode, while talking about the basics of executing queries, I said that SQL Server caches execution plans in memory, reusing them whenever the same query gets executed again. I've also talked about the dynamic management views (DMVs) that let you query what's in SQL Server's memory. Let's put those two things together and find out what queries have been running on the server lately.

Read more about DBA Training Plan 12: What Query Plans Are In Cache? 5 comments — Join the discussion
Performance Tuning

DBA Training Plan 11: The Basics of Executing a Query

Up til now in the DBA Training Plan, we've been taking inventory of our servers, making sure the data's well-protected, and understanding the basics of how the data's stored in indexes inside those data files. Now, let's start looking at performance, and let's start by zooming really far out to think about how SQL Server runs a query.

Read more about DBA Training Plan 11: The Basics of Executing a Query 13 comments — Join the discussion
Performance Tuning

DBA Training Plan 9: My 3 Index Guidelines

In our last episode, we used sp_BlitzIndex @Mode = 2 to get to know the contents of our database, sorted our indexes from biggest to smallest, and started asking questions about leftover backup tables that we probably didn't need to keep around anymore.

Now that you've taken out the trash, let's have a closer look at what's left. This time, run sp_BlitzIndex without a Mode parameter:
[crayon-6a649614e32a7531228983/]
You get back a prioritized list of index design issues like:

Read more about DBA Training Plan 9: My 3 Index Guidelines 1 comment — Join the discussion
Performance Tuning

DBA Training Plan 7: How SQL Server Stores Stuff in MDF Files

So far in the DBA Training Plan, we've been working hard to make sure the contents of our MDF files are backed up, corruption-free, and secured. Now, uh...what's actually inside them?

Inside each of your database data files (MDFs, although technically you can use any extension you want, even PDF or MP3), SQL Server stores your data in 8KB pages. That's kilobytes - not megabytes, not gigabytes, but just mere kilobytes.

Read more about DBA Training Plan 7: How SQL Server Stores Stuff in MDF Files 6 comments — Join the discussion