Blogs

Using a Tail Log Backup in a SQL Server Migration (Dear SQL DBA Episode 34)

When you migrate a database, it can be useful to prove that you moved all the data and didn’t miss any transactions. Learn how to use a tail log backup in a migration scenario.

Continue reading

Data Type Mismatches Do Not Always Cause a Bad Implicit Conversion and Index Scan

Here’s a great recent question that I got about query tuning and index use:

Assuming that the documented levels of data type precedence in SQL Server are true as of SQL 2016, why does a bigint value not force an index scan when compared against an int column?

Continue reading

Why Indexes Reduce Locks for Update and Delete Queries

Indexes help queries run faster in SQL Server for several reasons. One of those reasons is that indexes can help your update and delete statements lock fewer rows. And I’m not only talking about shared locks, either.

Continue reading

Stack Dumps in SQL Server (Dear SQL DBA Episode 33)

Learn what a Stack Dump is in SQL Server and watch a demo where I cause a stack dump against a test SQL Server instance under load. Learn how to find information about stack dumps on your SQL Server, and how to escalate them when required.

Continue reading

Overindexing: Missing Index DMVs and the Database Tuning Advisor

SQL Server has tools that suggest indexes– and they’ll even auto-create the indexes for you.

I’m not a huge fan of these tools because they’ve got some notable flaws: they lead to creating more indexes than you need, and they aren’t super smart about the indexes they recommend.

Continue reading

How to Quickly Tell if an Execution Plan has Multiple Missing Index Requests

Ever see those little green messages at the top of an execution plan?

Those are missing index suggestions.

SQL Server loves to suggest that you consider changing up your index game.

Continue reading

New Course: Tuning Problem Queries in Table Partitioning

As of SQL Server 2016 SP1, you can now use partitioning in Standard, Web, and even Express Edition of SQL Server.

Everything’s gonna be fast! Right?

Well, not quite. But no worries, this course is now free.

Continue reading

WAL: The concept that makes recovery models & backups make sense (Dear SQL DBA Episode 32)

When you’re a Junior DBA, it’s really hard to take in all the information out there.

Learn about write ahead logging: the concept that can help you make sense of recovery models and backup strategies in SQL Server. This is a foundational concept that helps you understand how SQL Server works.

Continue reading

DBCC CLONEDATABASE Does NOT Clone Index Usage Statistics

The word ‘statistics’ is awfully confusing in SQL Server

It can mean “statistics” themselves – little objects that describe the distribution of data in columns or indexes to help the optimizer.

Or it can mean “usage statistics” -  dynamic management views that let you see how many times an index has been used or requested, how many times a query has been run, that kind of thing.

Continue reading

The BabbyNames Sample Database - Now on GitHub

1960 was the most popular year to name your baby ‘Dino’, with 386 Dinos born.

Continue reading