开发者

C# .net and CLR Stored Procedures Question

Are normal operations like:

DELETE From Product where ProductI开发者_开发技巧d = x faster in CLR then normal MS SQL 2005 Server Stored Procedures?


No.

The general recommendation is to continue to use T-SQL for set based operations, and only consider using CLR for compute-bound tasks (or tasks for which there is no T-SQL equivalent).

See, for example, this MS white paper


The short answer is no. While the difference may be so minute you would never be able to tell a stored procedure written in native T-SQL is going to be faster than one written in C# that has to be compiled into MSIL to run.

You should only do CLR stored procedures if you can't feasibly do something using native T-SQL. For instance I have a CLR procedure that works with EDI and I have to do a large amount of text processing and that is not very feasible using T-SQL.


Nope. Actually its faster to use stored procedure, since not every statement is recompiled on each use.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜