Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Function with parameters running slow Expand / Collapse
Posted Sunday, February 16, 2014 12:29 PM


Group: General Forum Members
Last Login: Tuesday, November 4, 2014 3:07 AM
Points: 22, Visits: 293
Hi All,
I am having a UDF which accepts two parameters .
It is running slow for the first time for any set of values. Same set of parameters are showing cache hit in profiler.
For a new value of parameters , there is a cache insert event in profiler.
Why there is a cache insert every time for new value of parameters? How should I proceed ?
Is this something related with parameters sniffing?

Thanks Aslam.
Post #1541923
Posted Sunday, February 16, 2014 2:21 PM



Group: General Forum Members
Last Login: Yesterday @ 10:53 AM
Points: 196, Visits: 696
Could you please post the definition of the function? This can help us to focus to problems in your UDF instead of discussing potential problems with any UDF.

Generally, the parameter sniffing behaviour is possible with Transact SQL functions too (in addition to SPs), but let's see first which type of UDF you are using and the function definition.

Do Not Optimize for Exceptions!
Post #1541933
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse