Hi, In a Stored procedure , I am inserting rows in a temporary table does not having any index. If I issue Truncate Command on this temporary table . Does it cause recompilation of Store procedure ? Thanks in Advance!!
I don't think so. I tested in 2005 and truncate is not a cause of recompilation of sp. It may be because of statement level recompiliation feature of sql server 2005. Coluld u pse confirm how about in SQL Server 2000 Madhu
See this http://blogs.msdn.com/sqlprogrammab...ry-tables-table-variables-and-recompiles.aspx that explains the cause, make better use of temp tables.