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

    Sorting in Stored Procedures – Food for Thought

    January 29, 2020 /

    We know that sorting can be one of the most expensive things in an execution plan as shown below. However,  we continue to do ORDER BYs repeatedly. Yes, I 100% agree that there is a need to sort a results set and that this should be done in the procedure for good reason, but my concern is having  multiple sorts, erroneous sorts, and the sorts that can be done elsewhere. These are the ones that waste resources and can stifle performance. Many of us writing procedures tend to write in code blocks. We write the SELECT, JOINS, FROMs and WHERES then immediately follow it up with and ORDER BY as…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    Please Don’t Do This! Default Index Fill Factor

    September 6, 2017

    How to Get Started with Always Encrypted for Beginners Part 2

    December 13, 2017

    My Thoughts on PASS Virtual Summit – An Editorial

    June 11, 2020

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

  • What’s a Key Lookup?
    What’s a Key Lookup?
  • Tempdb Performance Improvements in SQL Server 2022 are Dramatic
    Tempdb Performance Improvements in SQL Server 2022 are Dramatic
  • Synchronous VS Asynchronous Statistics Updates
    Synchronous VS Asynchronous Statistics Updates
  • SQL Index Creation Using DROP EXISTING= ON
    SQL Index Creation Using DROP EXISTING= ON
  • It's All in the Name, Index Naming Conventions
    It's All in the Name, Index Naming Conventions
  • Hide and Group Columns in SSRS Using a Parameter
    Hide and Group Columns in SSRS Using a Parameter
  • System-Versioned Temporal Tables
    System-Versioned Temporal Tables
  • Ruh-Roh! SQL Server 2025 Finally Brings Us a Free Standard Developer Edition -  Scooby Dooing Episode 2
    Ruh-Roh! SQL Server 2025 Finally Brings Us a Free Standard Developer Edition - Scooby Dooing Episode 2
  • Trouble Shooting Little Jewel -Windows PSR (Problem Steps Recorder)
    Trouble Shooting Little Jewel -Windows PSR (Problem Steps Recorder)
  • DMV’s for the Beginner
    DMV’s for the Beginner
Graceful Pro Theme by Optima Themes - 2026 ©
 

Loading Comments...