Overview
Figure 11-1 shows the basic compilation “pipeline” for a single query.
Figure 11-1. Query processor pipeline.
When a query is compiled, the SQL statement is first parsed into an equivalent tree representation. For queries with valid SQL syntax, the next stage performs a series of validation steps on the query, generally called binding, where the columns and tables in the tree are compared to database metadata to ensure that those columns and tables exist and are visible to the current user. This stage also performs semantic checks on the query to ensure that it’s valid, such as making sure that the columns bound to a GROUP BY operation are ...
Get Microsoft SQL Server 2012 Internals 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.