Why this SP is taking so long

wherrera 2014-12-11 22:06:39

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

wherrera 2014-12-12 18:00:11
SQLkiwi 2014-12-11 22:44:25
You're using nested cursors.
wherrera 2014-12-12 15:18:21
Thanks for the help
Any Suggestions in order to improve the performance?
SQLkiwi 2014-12-12 17:25:59
It's hard to say much based on an estimated anonymized plan, aside from to recode the logic to not use nested cursors.
wherrera 2014-12-12 17:59:32
Thank again I will upload the non anonymized plan might you can help me with that…