I have a weird issue with one of my stored procedure. It used to work correctly. But recently it is take to forever to complete.
I tried to locate where it got stuck by dumping the procedure to a query window and execute them as a sequence of sql statements. But they work fine.
So I am totally confused. What is the difference between those 2 approaches?
Any input is appreciated.