none
Direct Linq RRS feed

  • Question

  • When I use Linq engine converts expression tree into SqlText that it sends to SqlServer

    On the server side I execute Sql query Engine parses it, compiles it, and runs it.

    Why I cant directly send the expression tree to the storage?

    May be not for server db , but for in process it should be possible.

    any way to do this?


    .NET guy
    Wednesday, October 12, 2011 2:16 PM

Answers

  • Hi tsadigov;

    To your question, "Why I cant directly send the expression tree to the storage?", if you are asking why the expression tree is not set to SQL server for execution it is because SQL server only knows the SQL syntax language and knows nothing about expression trees.

     


    Fernando (MCSD)

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    Wednesday, October 12, 2011 3:51 PM

All replies

  • Hi tsadigov;

    To your question, "Why I cant directly send the expression tree to the storage?", if you are asking why the expression tree is not set to SQL server for execution it is because SQL server only knows the SQL syntax language and knows nothing about expression trees.

     


    Fernando (MCSD)

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    Wednesday, October 12, 2011 3:51 PM
  • SqlServers storage engine doesnt understand SQL, the parser generates tree and sends to optimizer , it optimizes and sends to execution engine. The Linq expression tree contains all the semantics that execution engine neads.

    Is there a way to to overcome encode decode phase into Sql and directly send expression tree to the storage?

    Is this possible in any DB engine?
    .NET guy
    Friday, October 14, 2011 6:23 AM
  •  

    Not that I know of.

     


    Fernando (MCSD)

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    Friday, October 14, 2011 1:11 PM