title: In SQL, is UPDATE always faster than DELETE+INSERT?
body: <p>Say I have a simple table that has the following fields:</p>
  
  <ol>
  <li>ID: int, autoincremental (identity), primary key</li>
  <li>Name: varchar(50), unique, has unique index</li>
  <li>Tag: int</li>
  </ol>
  
  <p>I never use the ID field for lookup, because my application is always based on working with the Name field. </p>
  
  <p>I need to change the Tag value from time to time. I'm using the following trivial SQL code: </p>
  
  <pre><code>UPDATE Table SET Tag = XX WHERE Name = YY;
  </code></pre>
  
  <p>I wondered if anyone knows whether the above is always faster than:</p>
  
  <pre><code>DELETE FROM Table WHERE Name = YY;
  INSERT INTO Table (Name, Tag) VALUES (YY, XX);
  </code></pre>
  
  <p>Again - I know that in the second example the ID is changed, but it does not matter for my application.</p>