You are here: Re: SQL Server 2005: CLR functions vs SQL functions « MsSQL Server « IT news, forums, messages
Re: SQL Server 2005: CLR functions vs SQL functions

Posted by Erland Sommarskog on 05/27/06 19:20

(billmiami2@netscape.net) writes:
> By how much were the CLR UDFs faster than the expressions using
> built-in functions? Was the difference enough to motivate you to start
> writing CLR UDFs in the future, even though you would create
> dependencies on the DLLs that you otherwise would not have?

The difference was significant. (I don't feel like disclosing any exact
numbers, because this was test with beta software, so the numbers are not
relevant for the product today, and disclosing numbers may be compliant
with the license agreement for the beta.)

Since our product will support SQL 2000 for at least our up-coming
version as well, I have not really started thinking of how much we
will use the CLR. But I have at least one function that I'm pretty
sure that I will rewrite in C#: this UDF performs "intelligent" rounding
of floats. This involves converting from float to string to decimal
and back to float.

We will get the CLR in our product anyway, as we today have a couple
of extented stored procedures, and a COM module that we call from
SQL Server. These we plan to rewrite. This means that we will need
to hand CLR modules in our build process. (And I am quite sure that
that will not involve Visual Studio.)

Note also, that there are *no* dependencies on DLLs at run time. The
assemblies are stored within SQL Server.

> Also, did you find any cases where a CLR aggregate gave you any
> benefit?

I have not explored CLR aggregates very closely, and I have not seen
any apparent scenarios where they come in handy for us.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация