Article: Troubleshooting Stored Procedure Recompilation
Historical article · Originally published March 21, 2004; technical details may be outdated.
Josh posted about recompilation problems he had when using #temp tables in his sprocs.
He then got a great comment from Roman referring to this article : Troubleshooting Stored Procedure Recompilation
One more little tidbit: You don't have to DROP temp tables at the end of the sproc. They will be dropped automatically when the sproc finishes.