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!

  • 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

    SQL Data Discovery and Classification in SSMS 17.5

    December 5, 2018

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

    October 17, 2025

    This Idera ACE Has Been Busy

    August 23, 2016
  • 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

    Does Your Code Have a Preamble?

    October 18, 2017

    Time for a Change

    April 17, 2017

    Hide and Group Columns in SSRS Using a Parameter

    December 9, 2016
  • Azure,  Performance Tuning

    Using Readable Secondary in Azure SQLDB

    June 30, 2021 /

    When using a Geo Replicated Azure SQL Database Readable Secondary  there are a few things to consider when it comes to performance tuning. Check out this episode of Data Exposed: MVP Edition as we discuss what you need to keep in mind with Microsoft’s Anna Hoffman, @AnalyticAnna.    

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    Install ALL Things SQL Server… What?

    November 26, 2019

    SQL Server Data Collection and Management Data Warehouse

    October 3, 2018

    SSRS Report Won’t Render in VS Preview

    April 12, 2016
  • Performance Tuning

    Identifying SQL Server Performance Problems Part 3

    February 24, 2021 /

    Continuing with our Performance Tuning series as you have learned baselining and knowing your normal system performance metrics is an important part of performance tuning. In part 1 we discussed collecting vital system metrics such as CPU Utilization and Memory usage. In part 2 we took a glimpse into how we can gather those metrics and other using the different tools that are available to use like Performance Monitor, Profiler, Extended Events and DMVs. In this part 3 we will look at how identifying the appropriate waits events and corresponding resolution will be critical for resolving performance issues. But first you need to understand what waits are and where to find…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    Static Data Masking (SSMS 18.0 Preview)

    December 19, 2018

    Synchronous VS Asynchronous Statistics Updates

    October 25, 2017

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

    August 25, 2025
  • Performance Tuning

    SQL Index Creation Using DROP EXISTING= ON

    February 17, 2021 /

    When you are making changes to an existing Non-Clustered index SQL Server provides a wide variety of options. One of the more frequently used methods is DROP EXISTING; in this post you will learn all about that option. This option automatically drops an existing index after recreating it, without the index being explicitly dropped. Let us take a moment understand the behavior of this choice. DROP EXSITING=ON which is my preferred method, will DROP the current index only after it finishes creating and building the index with the new definition. The pitfall is that if the index does not exist, you will get an error and must create it without the…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    Please Don’t Do This! Default Index Fill Factor

    September 6, 2017

    Caution When Dropping Unused Indexes on an Azure SQL Database

    August 12, 2020

    Eliminating Unnecessary DELETE Operations

    February 27, 2025
  • Back to Basics,  Performance Tuning

    Identifying SQL Server Performance Problems Part 2

    February 10, 2021 /

    Performance Monitoring Tools In this second post we are diving into what tools you can use to capture the important performance metrics you need to gather for baselining your environment. Be sure to read part one first. Performance Monitor First let’s start with what comes native to Windows Server platform, whether you are on an Azure SQL Virtual Machine or your standard SQL Server instance install on premises you have a native tool, called Performance Monitor (affectionately known to most as PerfMon). This reliable tool allows you to easily monitor performance metrics through a Graphical User Interface (GUI), by selecting performance counters for the operating system as well as installed applications such as SQL Server. It…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    Bloggers Should Have Reach

    February 14, 2018

    Static Data Masking (SSMS 18.0 Preview)

    December 19, 2018

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

    November 4, 2025
  • Back to Basics

    Mastering TempDB: The Basics

    February 3, 2021 /

    I regularly deliver a presentation called “Mastering TempDB”. I wrote it based on what I wish I knew about TempDB “growing up” in my career as a SQL Server DBA. It really is a breakdown of what TempDB is, how it is used, what problems actually occur within it, and how to best configure it. With advice from my colleagues, I have decided to break that down into this article to educate you. What is TempDB? TempDB is a global resource used by everyone and everything inside SQL Server. Think of it as a dumping ground for anything that doesn’t fit in memory. It is always database_id number two in…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    Bloggers Should Have Reach

    February 14, 2018

    Sorting in Stored Procedures – Food for Thought

    January 29, 2020

    This Idera ACE Has Been Busy

    August 23, 2016
  • Back to Basics,  Problems & Solutions

    Resizing Tempdb (When TEMPDB Wont Shrink)

    September 9, 2020 /

    Occasionally, we must resize or realign our Tempdb log file (.ldf) or data files (.mdf or .ndf) due to a growth event that forces the file size out of whack. To resize we have three options, restart the SQL Server Service, add additional files, or shrink the current file. We most likely have all been faced with run away log files and in an emergency situation restarting the SQL Services may not be an option but we still need to get our log file size smaller before we run out of disk space for example. The process of shrinking down that file can get tricky so I created this flow…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

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

    August 25, 2025

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

    March 28, 2022

    SSRS Report Won’t Render in VS Preview

    April 12, 2016
  • Azure,  Performance Tuning

    Adaptive Joins in SQL Server

    September 2, 2020 /

    SQL Server 2017 (compatibility 140) brought us many Intelligent Query Processing (IQP), formally known as Adaptive Query Processing, features that improve performance on workloads straight out of the box with no code changes to implement. One of those features introduced was Adaptive Joins. In this feature the join operator is dynamically determined at runtime by the optimizer, which defines a threshold number of rows and then chooses between a Nested Loop or Hash Match join operator. This operator switch can produce a better join and improve performance of your queries without you having to lift a finger. Not all queries will qualify for this new feature. The feature only applies…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    SSRS Report Won’t Render in VS Preview

    April 12, 2016

    The FAST number_rows Query Hint

    October 16, 2019

    TIL: Microsoft Azure Part 1

    May 17, 2017
  • Azure

    Caution When Dropping Unused Indexes on an Azure SQL Database

    August 12, 2020 /

    Index Maintenance is an important aspect of database health. Above and beyond regular index rebuilds and reorganizations it is important to understand the usage of the indexes on your database. Cleaning up unused indexes can save a lot of overhead on Insert/Update/Delete operations. To achieve that goal, I typically run a script like the one shown below and check out whether or not an index has had any seeks or scans against it as a starting point in my cleanup regiment. SELECT d.name,        OBJECT_NAME(i.[object_id]) AS [ObjectName],        i.[name] AS [IndexName],        s.user_seeks,        s.user_scans FROM sys.indexes AS i     LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s         ON i.[object_id] =…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    Query Predicates in SQL Server

    May 24, 2018

    Live, Learn, and Grow

    April 25, 2018

    T-SQL Tuesday #84 – Helping New Speakers

    November 8, 2016
12345

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

  • Resizing Tempdb (When TEMPDB Wont Shrink)
    Resizing Tempdb (When TEMPDB Wont Shrink)
  • What’s a Key Lookup?
    What’s a Key Lookup?
  • Please Don’t Do This! Default Index Fill Factor
    Please Don’t Do This! Default Index Fill Factor
  • Understanding Columnstore Indexes in SQL Server Part 1
    Understanding Columnstore Indexes in SQL Server Part 1
  • How to get started with Always Encrypted for Beginners Part 1
    How to get started with Always Encrypted for Beginners Part 1
  • Memory Optimized Tables in SQL Server
    Memory Optimized Tables in SQL Server
  • TIL: Microsoft Azure Part 1
    TIL: Microsoft Azure Part 1
  • DMV’s for the Beginner
    DMV’s for the Beginner
  • Hmmm... What’s This? Date Correlation Optimization in SQL Server
    Hmmm... What’s This? Date Correlation Optimization in SQL Server
  • 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
Graceful Pro Theme by Optima Themes - 2026 ©
 

Loading Comments...