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
Author
Message
Posted Sunday, February 16, 2014 12:29 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, July 25, 2014 6:21 AM
Points: 21, Visits: 291
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


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, August 28, 2014 3:44 AM
Points: 156, Visits: 619
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