We are experiencing performance problems using a table variable in a Stored Procedure. Here is what actually happens :
What is the difference between: CREATE TABLE #temp ( [ID] INT) INSERT INTO #temp SELECT ... and DECLARE @temp TABLE ( [ID] INT)