sp_Blitz Result: Stored Procedure WITH RECOMPILE Option

When you create a stored procedure using the WITH RECOMPILE option, it gets a brand new execution plan every time it runs.  This can be good for high performance queries because they get a plan perfect for the variables that are passed in.  However, this causes increased CPU time due to compiling the execution plan over and over.

This part of our SQL Server sp_Blitz script looks for queries that are asking to be recompiled every time they’re run. Consider whether that’s making things better, or worse.

To Fix the Problem

Check out Kendra Little’s video on The Use and Abuse of RECOMPILE in SQL Server.

Return to sp_Blitz or Ask Us Questions