(SQL) Tip of the Day: Updating Statistics and Recompiling Stored Procedures

Today’s Tip…

When you run into a performance issue in SQL (On premise or SQL Azure) a common technique is to update your statistics to help improve performance. A quick way to do this is to use this script which will provide the TSQL commands to update all your stats with FULLSCAN, just copy and run the output of this query.

image

For good measure you can then recompile all your stored procedures so they can use the best query plans based on these new stats.

image