Blogs

Partitioned Tables: Rolling/Rotating/Round-Robining Partitions

I recently received a terrific question about options for “rotating” table partitions.

Continue reading

Why Is My Function Missing From sys.dm_exec_query_stats and Query Store?

I just spent 90 minutes of my life figuring out a detail about sys.dm_exec_query_stats which I’m pretty sure I figured out five years ago, but didn’t write a blog post about.

Time to write a blog post, so I can save time when I go searching for this in a couple years.

Continue reading

Adding a Downloadable Calendar Event File to Wordpress without a Plugin

Let’s say you’ll be doing an event soon – say a Facebook Live event– and you want to create a calendar reminder for folks to download. Lots of us live and die by calendar invites, so this can be helpful to get people to attend.

Continue reading

New Course: Why Table Partitioning Does Not Speed Up Query Performance – With One Exception

Table Partitioning is Tricky Business

In this new course you will learn why SQL Server’s table partitioning feature won’t make your queries against disk-based rowstore indexes faster– and may even make them slower.

Continue reading

The Case of MAX() Requiring an Index Scan, While TOP(1)/ORDER BY DESC Does Not

Most of the time in SQL Server, the MAX() function and a TOP(1) ORDER BY DESC will behave very similarly.

If you give them a rowstore index leading on the column in question, they’re generally smart enough to go to the correct end of the index, and – BOOP! – just pluck out the data you need without doing a big scan.

Continue reading

SQL Server 2026: BAGI Edition (#TSQL2SDAY 100!)

It’s T-SQL Tuesday’s 8 year birthday (or close enough), and Adam Machanic has challenged us with the question: what will the world be like when T-SQLTuesday turns 16?

Continue reading

New Free Webinars! Index Tuning, Free Q&A, and Isolation Levels

I’ve got a whole slew of free webcasts and events coming this spring. I’m excited about each and every one of them!

Continue reading

What is a Morally Equivalent Execution Plan, and Why Is It Useful?

I recently wrote a fairly complicated post, called “Forced Plan Confusion: Is_Forced vs Use Plan = True.”

You do NOT need to go read that post to understand this one. I think I’ve found simpler way to explain the most important part of that post - and why it’s A Very Good Thing.

Continue reading

New Free Posters & Desktop Backgrounds for Download

I love fun desktop wallpapers

You may have noticed that there’s something about cartoons combined with SQL Server that makes me happy. Having those images on my desktop inspires me and helps me feel creative. Work should involve fun.

Get the download on GitHub

Continue reading

EstimateRowsWithoutRowGoal helps you see: is it a statistics problem?

SQL Server Management Studio version 17.5 adds a welcome feature for execution plans: a new visual attribute named EstimateRowsWithoutRowGoal.

Continue reading