Function with parameters running slow

  • 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.

  • 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!

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply