We have a SP which is running for ever ,where as when it is run as script it takes just couple of minutes to complete. I tried couple of things 

A) tried to flush the plan for that procedure  and run again but didn't run.
b) I tried to run the SP with recompile  but didn't run.

What can be the possible reasons that it runs as plain script and not as SP even after flushing the cache for that SP.