Tips For Debugging Large Procedures

Erik Darling has a few hints for debugging large stored procedures in SQL Server:

Tip #1: Format Your Code

There’s no shortage of free and paid tools out there. This list from the Recently Legendary Aaron Bertrand on Stack Exchange has both.

This one alone is great.  Erik has several other tips as well.

Related Posts

Temp Table Caching And Reuse

Shane O’Neill ran into an error with his stored procedure call: We store the results in a temporary table first. Don’t worry, that’s not the end of the post. That’s not even the point of this post. It is, however, what I was doing when I came across a weird error. Let me show you! […]

Read More

Rowgroup Elimination In Stored Procedures

Erik Darling notes a parameter sniffing problem when trying to use rowgroup elimination in a stored procedure: So where are we? Well, we found that Rowgroup Elimination is possible in stored procedures with ColumnStore indexes, but that the cached plan doesn’t change based on feedback from that elimination. Good news: elimination can occur with variables […]

Read More

Categories

May 2018
MTWTFSS
« Apr Jun »
 123456
78910111213
14151617181920
21222324252627
28293031