title: Speed of using SQL temp table vs long list of variables in stored procedure
body: <p>I have a stored procedure with a list of about 50 variables of different types repeated about 8 times as part of different groups (declaration, initialization, loading, calculations, result, e.t.c.).</p>
  
  <p>In order to avoid duplication I want to use temp tables instead (not table variable, which does not bring advantages that I seek - inferred type).</p>
  
  <p>I've read that temp tables may start as "in memory table" and then are spilled to disk as they grow depending on amount of memory and many other conditions.</p>
  
  <p>My question is - if I use temp table to store and manipulate one record with 50 fields, will it be much slower than using 50 variables ?</p>