4.3e Final Lab: usp_FindRelatedPosts

This stored procedure queries a view, which queries a multi-statement table valued function (MSTVF). We unwrap this hot nested mess, make a quick fix to inline the function, and add an index to support the function’s work. We fire up SQLQueryStress again, and we’re going even faster.

To access this incredible, amazing content, you gotta get Mastering Query Tuning or Recorded Class Season Pass, or log in if you already shelled out the cash.