Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Udf vs. sp
Message
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Title:
Miscellaneous
Thread ID:
01057271
Message ID:
01057274
Views:
13
>I've been writing some complex sp's and have started to incorporate some UDF's with them. This is kind of a general question but is there any significant performance differences?

I'm unaware of any prformance differences between SPs and UDFs but UDFs have a lot of restriction on which T-SQL statements/function can be used inside it.

>I read somewhere that you shouldnt use a UDF for data access. Just trying to get some opiniolns.

The UDFs have big negative impact on query performance. It's recomended to avoid using UDFs that are called for each record in the query. On other hand UDF can be used as parametrized view to return a recordset that can be used later in other query.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform