Problem with UDF(urgent)

  • I have an inline user defined function which consists of select statement.This function used to take 5 mins to execute but from last couple of days its taking 4 hrs to execute.I don't see any blocking and deadlocks.I have applied reindexing and update statiscs on the table in select statement and still same result.I restored same database on UAT box and executed the UDF and its taking just 5 minutes.Cpu,memory looks good.

     

    Could you please anybody help me with this.Its very urgent.

     

    Thanks,

    SR

    Thanks,
    SR

  • Have you recompiled the PROC.

    Also looking into getting the actual execution plan.

    And finally, you may be experiencing "Parameter Sniffing"...if you do a search of this site (and SQLTeam.com) you will find descriptions + solutions to same.

  • Thanks for your response Murphy.Its not a stored procedure its a user defined function.I have seen the excution plan.Its almost same in both QA and Prod server.

    I will look into Parameter Sniffing.

     

    Thanks,

    SR

     

     

    Thanks,
    SR

  • Hi Andrew,

    Is Parameter sniffing is applicable for functions also?

    Thanks,

    Sree

     

     

    Thanks,
    SR

  • Don't know.....but if you can locate some links on SQLTeam.com....try asking the people who provided the answers.  They have more direct experience of the problem and the solution.

    Also....have you tried activating PROFILER to monitor the problem code.  That should give more detailed info on the cause of the problem.

  • Thanks Andrew.I will check it in sqlteam.com.

    I turned on trace but I didn't find anything unusual.

     

    Thanks,

    SR

    Thanks,
    SR

  • pls check ur log file sometimes the log file may be heavy

    if so truncate the same

     

  • Log file looks good Bose.

     

    Thanks,

    SR

    Thanks,
    SR

Viewing 8 posts - 1 through 7 (of 7 total)

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