Blogs

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

Will the Cloud Eat My DBA Job? (Dear SQL DBA Episode 31)

Will cloud services render DBAs obsolete? Does the cloud mean that developers will use less of SQL Server? In this post I talk about the future of database administration and give tips on strategizing your career.

Continue reading

Understanding avg_total_user_cost and avg_user_impact in Missing Index Requests

The hardest thing about looking at index requests in SQL Server is understanding what the column names mean.

Continue reading

Adding Partitions to the Lower End of a Left Based Partition Function

I recently got a table partitioning question from a reader:

We now need to load some historical data into the table for 2013 so I want to alter the function and schema to add monthly partitions for this. But I can’t work out how to do this using SPLIT? Every example and tutorial I’ve looked at shows how to add new partitions onto the end of a range, not split one in the middle.

Continue reading

Confused by sp_who2 (Dear SQL DBA Episode 30)

This week’s ‘Dear SQL DBA’ question gets us down to the essentials: how to I tell if a transaction is hanging?

Continue reading