Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Linq
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Re: Linq
Miscellaneous
Thread ID:
01246058
Message ID:
01246333
Views:
34
Linq to Sql engine is smart enough to generate the folowing SQL query in order to send if to SQL Server:

Hi, Fabio,

That's going to be true for relatively simple queries, but not so for more complicated ones. For instance, if you write a LINQ query to retrieve muliple calculated aggregations from the same parent table, LINQ generates some pretty inefficient SQL code (I've even seen it generate multiple correlated subqueries for the same parent table).

Somewhere in a prior post, someone stated that since this is "new" technology, it's going to feel like a step backwards. I see it differently - SQL Analysis Services and Reporting Services contain builders to create MDX queries that aren't what I would call efficient. "Builders" in general are functional but not necessarily the most efficient. I think the best way to get the most efficient SQL is to write SQL. ;)

There is general consensus that those using stored procs for database access have limited/little interest in LINQ to SQL.

On the other hand, I really like Linq to XML, Linq to DataSets (for strongly-typed datasets), and Linq to Objects - those, along with the new language features like lambdas and object initializers, are the cool new features, IMO.

Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform