Microsoft SQL Server 2014 Unleashed
by Ray Rankins, Paul Bertucci, Chris Gallelli, Alex T. Silverstein
Compiling DML Statements
When SQL Server compiles an execution plan for a DML statement, it performs the following basic steps:
1. The query is parsed and checked for proper syntax, and the T-SQL statements are parsed into keywords, expressions, operators, and identifiers to generate a query tree. The query tree (sometimes referred to as the sequence tree) is an internal format of the query that SQL Server can operate on. It is essentially the logical steps needed to transform the query into the desired result.
2. The query tree is then normalized and simplified. During normalization, the tables and columns are verified, and the metadata (data types, null properties, index statistics, and so on) about them is retrieved. In addition, any views ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access