Conclusion

In this chapter, you have seen how SQL Server processes stored procedures. First, SQL Server parses all the code that's passed. When the procedure is first executed, SQL Server compiles the code into an execution plan. The execution plan is made up of a query plan, which is the actual way to get to the data, and the execution context, which is the specifics for that particular execution. Lastly, you saw how the graphical showplan works and how to interpret the data returned.

Get Writing Stored Procedures for Microsoft SQL Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.