I removed the parameter from the SP and executed the SP (declare local variable and assign value instead) and it ran fine. I got the results in about 7 minutes.
I tested this change in one server and I am testing it in other servers now. I will let you know. Thanks.
Give me a fish, you feed me for a day! Teach me to fish, you feed me for a life time.