Re: SQL to Linq - Left, Right and Inner Joins
- From: "Michel Walsh" <vanderghast@VirusAreFunnierThanSpam>
- Date: Mon, 7 Jul 2008 10:54:15 -0400
"Frans Bouma [C# MVP]" <perseus.usenetNOSPAM@xxxxxxxxx> wrote in message
news:uIv2j0A4IHA.2336@xxxxxxxxxxxxxxxxxxxxxxx
(...)
Though there are still differences in performance. Take these two:
select c.*
from customers c cross join orders o
cross join employees e cross join [order details] od
where
c.CustomerId = o.CustomerId
and
e.EmployeeId = o.EmployeeId
and o.OrderId = od.OrderId
vs.
select c.*
from customers c inner join orders o
on c.CustomerId = o.CustomerId
inner join employees e on e.EmployeeId = o.EmployeeId
inner join [order details] od on o.OrderId = od.OrderId
THe server trace shows that the duration of the query first query is much
longer than the second query.
The query plans are the same. The tracer may show that the second took less
time simply because some data was still in the data cache!
Look at the execution plans! they are both the same!
Vanderghast, Access MVP
.
- References:
- SQL to Linq - Left, Right and Inner Joins
- From: shapper
- Re: SQL to Linq - Left, Right and Inner Joins
- From: Michel Walsh
- Re: SQL to Linq - Left, Right and Inner Joins
- From: Frans Bouma [C# MVP]
- Re: SQL to Linq - Left, Right and Inner Joins
- From: Michel Walsh
- Re: SQL to Linq - Left, Right and Inner Joins
- From: Frans Bouma [C# MVP]
- Re: SQL to Linq - Left, Right and Inner Joins
- From: Jon Skeet [C# MVP]
- Re: SQL to Linq - Left, Right and Inner Joins
- From: Frans Bouma [C# MVP]
- Re: SQL to Linq - Left, Right and Inner Joins
- From: Jon Skeet [C# MVP]
- Re: SQL to Linq - Left, Right and Inner Joins
- From: Frans Bouma [C# MVP]
- SQL to Linq - Left, Right and Inner Joins
- Prev by Date: Re: Cannot update database
- Next by Date: Regex: different options on different sections of the Regex?
- Previous by thread: Re: SQL to Linq - Left, Right and Inner Joins
- Next by thread: Re: SQL to Linq - Left, Right and Inner Joins
- Index(es):
Relevant Pages
|