Enjoy Every Sandwich

Thoughts on SQL, XML, .NET and sometimes beer.

<December 2008>
SuMoTuWeThFrSa
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910


Navigation

Tools

List O'Links

Kent's Other Stuff

Subscriptions

News

Please read these
Notices and Disclamiers

Post Categories

Article Categories



Interesting post on LINQ (possible Wiki?)

Larry O'Brien has a good post explaining that DLINQ doesn't go from code directly to T-SQL. I'd like to chime in on this part of his post, though:

...In other words, DLINQ will resolve the query into native SQL and use all the appropriate database indices and execution plan optimization and so forth...

Not quite. DLINQ works with expression trees and generates database version specific SQL from them. So for SQL Server, yes, it generates T-SQL. But since DLINQ will work against OLE-DB and ODBC data sources, so it won't always be T-SQL. It is also up to the Query Processor to know from the query that indexes and optimizations it can apply, not DLINQ itself. So in a sense, the classic performance problems with dynamic SQL aren't mitigated at all, at least in the bits we have now. Its possible that future versions of DLINQ will reflect on the database schema looking at things like indexes, partitions and so on trying to build a better query plan that QP would by default.

And silly me, I really was half-wondering why we need Plan Guides in the first place. Guess they make sense now. :)

posted on Wednesday, September 21, 2005 3:25 PM by ktegels





Powered by Dot Net Junkies, by Telligent Systems