Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A SQL challenge
Message
From
10/04/2014 14:58:02
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Environment versions
SQL Server:
SQL Server 2005
Application:
Web
Miscellaneous
Thread ID:
01598405
Message ID:
01598460
Views:
40
>
>I think CROSS APPLY and the Subquery shown by Walter are actually equivalent. I prefer CROSS APPLY as we can have more than 1 column.
>
>Brad Schulz had a blog explaining that CROSS APPLY and subquery is the same.

I personally like CROSS APPLY, but I have to acknowledge it can be a little more costly on IO/TIME statistics and the execution plan.

What is kind of amazing is how much Microsoft has optimized correlated subqueries over time. As recently as SQL 2000 (which was used by many deep into the second part of the decade), execution plans for correlated subqueries were often horrible. But by the next release the optimizer did a much better job with them
Previous
Reply
Map
View

Click here to load this message in the networking platform