To understand how to write solid, performant T-SQL, users should become familiar with how SQL Server runs T-SQL syntax to deliver the intended result sets in a scalable fashion. In this chapter, we covered the basic building blocks that make up a T-SQL statement, as well as how SQL Server interprets those blocks to begin the process of executing the user's query. The concepts introduced in this chapter will be used throughout the remaining sections of the book to explain most patterns and anti-patterns, as well as mitigation strategies.
In the next chapter, we will build on our knowledge of how SQL Server processes T-SQL statements to understand how the Query Processor optimizes, caches, and ultimately executes the query.