Slow Function

  • Hi,

    I have a function which calls on a view within it. It has been working fine and then suddenly it's taking 10 mins to run in the last few days. Nothing has changed on my end. Can someone please explain or if they have come across such situation before?

    Thanks

  • TST1 (11/3/2010)


    Hi,

    I have a function which calls on a view within it. It has been working fine and then suddenly it's taking 10 mins to run in the last few days. Nothing has changed on my end. Can someone please explain or if they have come across such situation before?

    Thanks

    First check is there any blocking or locking.

    Check the table fragmentation,no.of rows in the table and execution plan also ...

    Withou changing anything its not taking 10 mins.check with ur app & n/w team also.

    Muthukkumaran Kaliyamoorthy
    https://www.sqlserverblogforum.com/

  • Hi,

    There isn't any blocking nor fragmentation which is what I'm slightly confused by. The app team was also confused by this. We do use a third party software to load data in and this could be an issue as I have seen this in the past. I just wanted to check in general if it's a good idea to have a function calling a view.

    Cheers

  • TST1 (11/3/2010)


    Hi,

    There isn't any blocking nor fragmentation which is what I'm slightly confused by. The app team was also confused by this. We do use a third party software to load data in and this could be an issue as I have seen this in the past. I just wanted to check in general if it's a good idea to have a function calling a view.

    Cheers

    How much data are you loading in that table.its a one time activity.

    What type of wait did you see while that function running.

    Could you post the execution plan and dml structure too.

    If you think what you perform in FN the same can be done SP's .Then tel app team to use SP's instead of FN.

    Muthukkumaran Kaliyamoorthy
    https://www.sqlserverblogforum.com/

Viewing 4 posts - 1 through 3 (of 3 total)

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