Why this SP is taking so long

It took like 2 hour to perform this SP can somebody help me to find out why

avatar image By wherrera 16 asked Dec 11, 2014 at 10:06 PM
more ▼
(comments are locked)
avatar image wherrera Dec 12, 2014 at 06:00 PM
10|10000 characters needed characters left

1 answer: sort voted first

You're using nested cursors.

avatar image By SQLkiwi ♦ 6.6k answered Dec 11, 2014 at 10:44 PM
more ▼
(comments are locked)
avatar image wherrera Dec 12, 2014 at 03:18 PM

Thanks for the help Any Suggestions in order to improve the performance?

avatar image SQLkiwi ♦ Dec 12, 2014 at 05:25 PM

It's hard to say much based on an estimated anonymized plan, aside from to recode the logic to not use nested cursors.

avatar image wherrera Dec 12, 2014 at 05:59 PM

Thank again I will upload the non anonymized plan might you can help me with that...

10|10000 characters needed characters left
Your answer
toggle preview:

Up to 50 attachments (including images) can be used with a maximum of 209.7 MB each and 209.7 MB total.