title: Which is more efficent: update with a join, or Update with in statement?
body: <p>I have a temp table with a result set of IDs. I need to disable all the records from the main table that match the ID values within my result set.</p>
  
  <p>Which of the following statements is more efficient?</p>
  
  <pre><code>UPDATE MyTable
    SET Disabled = 1
  WHERE ID in (SELECT ID FROM @TempTable)
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>UPDATE T
    SET T.Disabled = 1
  FROM MyTable as T
  JOIN @TempTable as Temp
  ON T.ID = Temp.ID
  </code></pre>
  
  <p>Other minor question: Does Row count of the temp table effect this choice?</p>
  
  <p><em>update</em>
  ID is indexed on both MyTable, and @TempTable. I guess my question is "What factors should I think about when deciding between these two different techniques for the same outcome?"</p>