Doing a database restore may not be the most common task a database professional will ever do, but it’s a lot more frequent than you might think. Operational restores are not exactly uncommon for example. Now, when you are doing a recovery like this, what is common is that there are people in the database.…
Month: November 2017
5 Tips for Friday: Naming Conventions
I want to talk about some best practices concerning naming conventions. Most teams or organizations will come up with their own naming conventions for things. This post is not here to tell anyone how to define their naming conventions, especially for things outside of SQL Server. I want to talk specifically about things inside the…
Time Zones are a Drag ... Seriously
Time Zones were definitely being a drag today. I got an email from one of the developers at work asking about the performance difference between 2 queries. The only difference between the 2 queries is that one of them uses the AT TIME ZONE clause that was added in SQL Server 2016. I have not…
Why shouldn’t I shrink my database data file?
A while back I did a post about why you shouldn’t shrink your data file. This one is going to be similar in some ways, different in others. TL;DR: It’s pretty pointless and will almost certainly cause performance issues. Let’s start by asking why you might want to shrink your data file. It’s too big…
5 Tips for Friday: Waits and Queues
This Friday I want to talk about some best practices for troubleshooting queries using waits and queues. Waits and queues are excellent tools for trying to figure out why a query is running slower than you think it should be running. When a query has to wait for some reason, the query enters a suspended…
5 Tips for Friday: Replication
Time to talk about a subject that most DBAs hate, but some DBAs like me have a love-hate relation with it. Replication. Not storage replication or Availability groups. That old workhorse SQL Server data replication. Limit the number of articles per publication: Having to occasionally rebuild replication is a humongous pain in the backside, but…
5 Tips for Friday: Massively Parallel Queries
My day-to-day jobs deals mostly with performance tuning queries that run massively parallel. Like hundreds or thousands of the same query with different parameter values. With a normal query, 1 extra second of run time does not matter much. If the query has 2000 versions running at the same time, that’s an extra 2000 seconds…