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

    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

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

    August 25, 2025

    New Resumable Online Index Create SQL Server 2019

    November 28, 2018

    Importance of Statistics in SQL Server

    May 30, 2018
  • 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

    Master of None

    October 8, 2015

    Install ALL Things SQL Server… What?

    November 26, 2019

    It’s time to speak again!

    December 1, 2015
  • 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

    Are My SQL Server Indexes Being Used?

    August 28, 2019

    Hide and Group Columns in SSRS Using a Parameter

    December 9, 2016

    The FAST number_rows Query Hint

    October 16, 2019
  • 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

    Respectfully Responding

    June 14, 2018

    SQL Server Data Collection and Management Data Warehouse

    October 3, 2018

    Summit Submission Feedback Response

    June 28, 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

    How to get started with Always Encrypted for Beginners Part 1

    November 29, 2017

    Hide and Group Columns in SSRS Using a Parameter

    December 9, 2016

    5 Ways to Examine Cardinality Metrics

    May 2, 2018
  • 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

    Filtered Index Basics

    May 22, 2019

    So How Did It Go?

    September 28, 2015

    It’s time to speak again!

    December 1, 2015
  • 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

    Ruh-Roh! SQL Server 2025 Finally Brings Us a Free Standard Developer Edition – Scooby Dooing Episode 2

    August 28, 2025

    SQL Server Updates Tricked Me for Years

    February 21, 2018

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

    September 13, 2017
  • 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

    Please Don’t Do This! Default Index Fill Factor

    September 6, 2017

    Understanding Columnstore Indexes in SQL Server Part 1

    June 26, 2019

    So How Did It Go?

    September 28, 2015
  • Back to Basics,  Performance Tuning

    Identifying SQL Server Performance Problems Part 1

    January 27, 2021 /

    Every server, database, storage appliance and network encounter some sort of performance issues. It is a major part of our job as database administrators to properly monitor and fix those performance issues whether it is in your traditional on premises environment or in the cloud. This article will cover ways monitoring performance and how to establish a baseline. We will go over several important performance metrics every database administrator should know and how to gather and interpret those metrics through several different options within SQL Server and your Windows operating system. Now which tool you use to accumulate these metrics depends on what problem you are trying to solve. The…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    Memory Optimized Tables in SQL Server

    January 8, 2020

    Everything is coming up ACE’s

    October 28, 2015

    Hide and Group Columns in SSRS Using a Parameter

    December 9, 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

    QUICK & DIRTY: Table name change for all stored procedures

    December 10, 2015

    So let’s talk naming conventions

    September 15, 2015

    Memory Optimized Tables in SQL Server

    January 8, 2020
1234

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...