SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 82 | Next

Scott Klein

"Professional LINQ"


How many developers have really stopped to think about how SQL Server processes these queries? Does
SQL Server execute the query from top to bottom, starting with the SELECT clause and working its way
down? You might think that, but that is not how a query is processed in SQL Server at all. SQL Server
logically processes a query in the following order:
(8) SELECT
(9) TOP
(1) FROM
(3) JOIN
(2) ON
(4) WHERE
(5) GROUP BY
(6) WITH
(7) HAVING
(10) ORDER BY
Notice that the FROM clause is processed first, while the SELECT clause is processed almost last. Any
clause that is not specified in the query is simply skipped by the query-processing engine. So, why is this
information important?
36
Chapter 3: LINQ Queries
It points out the similarities between a LINQ query syntax and how SQL Server processes a query. You
have seen many times now the basic syntax of a LINQ query:
from c in contact
where c.FirstName.StartsWith("S")
orderby c.LastName
select c
The LINQ query and the T-SQL query are executed similarly, although the T-SQL query syntax is different.


Pages:
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6