A Shot of SQLEspresso

SQL Blogs by Monica Morehouse (Rathbun)

  • Home
  • Session Downloads
  • Event Calendar
  • PASS
    • Hampton Roads SQL User Group
    • SQL Saturday
    • PASS WIT VC
  • DCAC
  • Contact Me
    • Disclaimer
  • Home
  • Session Downloads
  • Event Calendar
  • PASS
    • Hampton Roads SQL User Group
    • SQL Saturday
    • PASS WIT VC
  • DCAC
  • Contact Me
    • Disclaimer

No Widgets found in the Sidebar Alt!

  • Performance Tuning

    Scooby Dooing Episode 10: The Case of the Copy-and-Paste Consultant

    November 4, 2025 /

    Every Scooby-Doo episode has one thing in common — there’s always a fake ghost. Sometimes, that “ghost” is really just a guy in a mask trying to scare everyone with smoke machines and spooky sounds. In the SQL Server world, this ghost appears as the canned-query consultant. You’ve seen them. They roll in with a big name and an even bigger slide deck. They click “Run All,” hand you a 200-page report filled with screenshots and DMV outputs, and vanish into the night. They didn’t solve your mystery; they just dumped a list of clues in your lap. Or worse, you hired a big-name consulting firm, which brought on a…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    New Resumable Online Index Create SQL Server 2019

    November 28, 2018

    Eliminating Unnecessary DELETE Operations

    February 27, 2025

    Can You Hear It Now?

    January 31, 2018
  • Azure,  Back to Basics

    Scooby Dooing Episode 9: The Case of the Artificially Intelligent Villain

    October 17, 2025 /

    Welcome back, my fellow sleuths, to my mystery-inspired blog series! I’m having a ton of fun writing these, and I hope you’re enjoying the ride through SQL Server’s haunted hallways as much as I am. For this one, the “ghost” isn’t a person in a mask — it’s AI. AI has burst onto the SQL Server scene like a new member of Mystery Inc., promising to solve every problem, write all your code, and tune every query. But here’s the truth: sometimes AI is the villain in disguise. When AI Leads the Gang Astray Picture this: the gang bursts into the abandoned carnival, and AI points dramatically at Fred —…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    Everything is coming up ACE’s

    October 28, 2015

    Install ALL Things SQL Server… What?

    November 26, 2019

    Invest in Yourself Stop Making Excuses

    October 22, 2019
  • Back to Basics,  Configurations,  New SQL Version,  Problems & Solutions

    The Mystery of the Locked-Up Database -Scooby Dooing Episode 6

    September 24, 2025 /

    No Scooby-Doo story is complete without footprints leading to a hidden passage. In SQL Server 2025, those footprints point us straight toward the next big feature: optimized locking. And like any good sleuth, we’re going to follow the trail step by step. But first, flip the levers that open the secret door: Turn on ADR before you hunt. Think of Accelerated Database Recovery (ADR) as the latch that unlocks the passage. You must enable ADR before you can enable optimized locking. (And if you ever need to turn ADR off, you’ll have to disable optimized locking first—no sneaking out the window!) RCSI = brighter flashlight. For the biggest win, enable…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    Approximate COUNT DISTINCT

    January 3, 2019

    SQL Data Discovery and Classification in SSMS 17.5

    December 5, 2018

    How to get started with Always Encrypted for Beginners Part 1

    November 29, 2017
  • Performance Tuning

    Solving SQL Server Mysteries with a Whole Gang of Sleuths -Scooby Dooing Episode 4

    September 10, 2025 /

    One thing I’ve always loved about the Scooby-Doo cartoon is that he never solved a mystery alone. Scooby and Shaggy could sniff out a clue between snacks, but it always took the rest of the Mystery Inc. gang to crack the mystery. Velma helped with her smarts, Fred with the traps, and Daphne with spotting the overlooked details—all of them used their skills to actually catch the villain. And sometimes, they even brought in special guests, such as Batman, the Harlem Globetrotters, or Don Knotts, to help tackle the really tricky cases. Performance tuning in SQL Server works the same way. The Tunnel Vision Trap When you’re buried in a…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    Being a Woman in the SQL Community

    February 26, 2020

    The Case for Scooby-Dooing: Solving SQL Server Mysteries Like a Pro– Scooby Dooing Episode 8

    October 8, 2025

    The New Public Speaking

    April 29, 2020
  • Azure,  Back to Basics,  Performance Tuning,  Problems & Solutions

    Scooby-Doo and the Mystery of Cloud Costs (Let’s have some fun!) – Scooby Dooing Episode 1

    August 25, 2025 /

    If there’s one thing I’ve learned in consulting, it’s that SQL Server, and other database performance tuning isn’t just about faster queries—it’s directly tied to your bottom line in the cloud. Databases, because of their large memory and IO footprint are some of the most expensive cloud resources. Every extra read, every bloated execution plan, every oversized tier you’re running? That’s money disappearing faster than Scooby Snacks at a midnight ghost chase. So, grab your Scooby-Doo hat, because it’s time to solve the mystery of runaway cloud costs. Clue 1: Start with Query Store – Your Map of Clues Every good mystery starts with clues, and in SQL Server (and…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    Can You Hear It Now?

    January 31, 2018

    Free Training 24HOP

    April 18, 2018

    Query Predicates in SQL Server

    May 24, 2018
  • Performance Tuning

    Eliminating Unnecessary DELETE Operations

    February 27, 2025 /

    SQL Server performance issues often stem from easy fix bottle necks that can be fixed with the right tuning strategies. This short blog will focus on the DELETE statement. The problem with DELETE statements is that it requires excessive logical reads and consumes transaction log space, even in simple recovery mode. DELETE is a row-based operation and generates large number of logical reads whereas TRUNCATE removes all of the rows of a table or partition at the storage, for a much faster and more efficient operation. Both DELETE and TRUNCATE remove data from a table, but they behave differently in terms of performance, recovery, logging, and rollback capabilities. The issue…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    November #SQLChat – How to Build your Name Recognition and SQL Network

    November 12, 2015

    Summit Submission Feedback Response

    June 28, 2016

    Synchronous VS Asynchronous Statistics Updates

    October 25, 2017
  • Performance Tuning

    RunAsRadio- Query Performance Tuning Strategies

    April 13, 2022 /

    Had a great time talking with Richard on RunAsRadio about Query Performance Tuning Strategies, check it out. How do you keep your SQL queries fast? Richard chats with Monica Rathbun about her approaches to SQL Server query tuning. Monica starts with defining the problem – how do we know that the database is the performance bottleneck? The conversation dives into measuring query performance and the power of Query Store, but only on SQL Server 2016 and above, so get upgrading! Entity Framework is a standard tool for developers to automate access to SQL. Still, it can generate some pretty ugly queries, and Monica talks about different ways to improve them,…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    Being a Woman in the SQL Community

    February 26, 2020

    SQL Server Vulnerability Assessment

    December 12, 2018

    My Thoughts on PASS Virtual Summit – An Editorial

    June 11, 2020
  • Back to Basics,  Performance Tuning,  Posts with Scripts

    Quick Tip: Remove CONVERT\CAST from your WHERE\JOIN clauses

    March 28, 2022 /

    Quick Tip Remove CONVERT/CAST from your WHERE clauses and JOINS when comparing to variables of different data types. Set their data types to match your table definitions before using them as a filter. Optimizing your queries this way will greatly reduce the amount of CPU time, reads, and I/O generated in your queries and allow your code to take better advantage of indexes. Example We are going to create a very simple stored procedure called ConvertExample. In this procedure we will see two things. One, the first procedure we create will declare two variables as VARCHAR( MAX) data types, then in the WHERE clause it will convert a table column…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    Everything is coming up ACE’s

    October 28, 2015

    Scooby-Doo and the Mystery of Cloud Costs (Let’s have some fun!) – Scooby Dooing Episode 1

    August 25, 2025

    How to get started with Always Encrypted for Beginners Part 3: One Two Punch

    January 17, 2018
  • Azure,  Performance Tuning

    Add Azure Cache for Redis to Your Azure SQL Performance Tuning Toolbox

    July 14, 2021 /

    One of the biggest impacts on resource consumption for Azure SQL DB are repeated data pulls by the application layer. No matter how fast those queries execute calling the same procedure or issuing the same SQL statements hundreds, thousands, or million times a day can wreak havoc on database performance. Death by a thousand cuts can easily bring a system to its knees. Sometimes it’s hard for DBAs to troubleshoot these actively as the execution of the statements happens so quickly they don’t even show in tools like sp_whoisactive. It’s not until you begin to dive into things like Query Performance Insights or Query Store that you start to see…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    The FAST number_rows Query Hint

    October 16, 2019

    Keep It Simple Stupid

    July 24, 2019

    Expanding My Reach

    February 7, 2018
  • Performance Tuning

    Add DBCC INPUTBUFFER to Your Performance Tuning Toolbox

    July 7, 2021 /

    A command I like to use when performance tuning is DBCC INPUTBUFFER. If you have ever run sp_whoisactive or sp_who2 to find out what sessions are executing when CPU is high for instance this can be a real quick life saver. At times, for me, those two options do not return enough information for what I’m looking for which is the associated stored procedure or object. Using this little helper along with the session id can easily get you that information. Let’s take a look. First, I will create a simple procedure to generate a workload. CREATE OR ALTER PROCEDURE KeepRunning AS DECLARE @i INT=1 WHILE (@i <1000) BEGIN select…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    What does this little check box do? Query Governor SQL Database Setting

    September 13, 2017

    Sorting in Stored Procedures – Food for Thought

    January 29, 2020

    How to Get Started with Always Encrypted for Beginners Part 2

    December 13, 2017
123

About Me

Monica Morehouse (Rathbun)

Microsoft MVP, Performancing Tuning Expert, Leader Hampton Roads SQL Server User Group, Read More…

Consulting

Sessions List

Favorite Tidbits

  • Reminder to Developers

Topic Categories

  • Azure
  • Back to Basics
  • Configurations
  • Data Masking
  • DevOps
  • Encryption
  • Idera Ace
  • Important Links
  • Indexes
  • Lone DBA
  • Misc
  • MVP
  • New SQL Version
  • Performance Tuning
  • Posts with Scripts
  • Problems & Solutions
  • Quick and Dirty
  • Security
  • Speaking
  • SQL Family
  • SQLSaturday
  • SSRS
  • Summit
  • Training
  • TSQL Tuesday
  • Uncategorized

Top Posts & Pages

  • It's All in the Name, Index Naming Conventions
    It's All in the Name, Index Naming Conventions
  • Resizing Tempdb (When TEMPDB Wont Shrink)
    Resizing Tempdb (When TEMPDB Wont Shrink)
  • SQL Index Creation Using DROP EXISTING= ON
    SQL Index Creation Using DROP EXISTING= ON
  • So let’s talk naming conventions
    So let’s talk naming conventions
  • The Case for Scooby-Dooing: Solving SQL Server Mysteries Like a Pro– Scooby Dooing Episode 8
    The Case for Scooby-Dooing: Solving SQL Server Mysteries Like a Pro– Scooby Dooing Episode 8
  • What’s a Key Lookup?
    What’s a Key Lookup?
  • Trace Flags That Are Now Defaulted Behaviors in SQL Server
    Trace Flags That Are Now Defaulted Behaviors in SQL Server
  • Understanding Columnstore Indexes in SQL Server Part 3
    Understanding Columnstore Indexes in SQL Server Part 3
  • Solving SQL Server Mysteries with a Whole Gang of Sleuths -Scooby Dooing Episode 4
    Solving SQL Server Mysteries with a Whole Gang of Sleuths -Scooby Dooing Episode 4
  • Memory Optimized Tables in SQL Server
    Memory Optimized Tables in SQL Server
Graceful Pro Theme by Optima Themes - 2026 ©
 

Loading Comments...