Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Performance Issues with Scalar Functions

Author  Topic 

Muhammad Nasir
Starting Member

10 Posts

Posted - 2011-02-04 : 00:13:16
Hi
Do scalar functions have any performance issues when used within sql query to fetch record ? if yes then what's an alternative ?

MIK_2008
Master Smack Fu Yak Hacker

1054 Posts

Posted - 2011-02-04 : 01:17:37
Yes it can raise performance issues. Alternative(s) is/are dependent to the requirements! :)

Cheers!
MIK
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2011-02-04 : 03:19:59
It all depends on what the function does and how many rows the function has to go through. But using functions in filtering criteria (join/where/group by) usually has a serious performance hit.

- Lumbago
My blog-> www.thefirstsql.com
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2011-02-04 : 03:21:14
...the alternative is (papppparaappaaaaaaaaa <- trumpet): NOT to use functions!! :)

- Lumbago
My blog-> www.thefirstsql.com
Go to Top of Page
   

- Advertisement -