title: Optimizing Delete on SQL Server
body: <p><code>Delete</code>s on sql server are sometimes slow and I've been often in need to optimize them in order to diminish the needed time.
  I've been googleing a bit looking for tips on how to do that, and I've found diverse suggestions.
  I'd like to know your favorite and most effective techinques to tame the delete beast, and how and why they work.</p>
  
  <p>until now:</p>
  
  <ul>
  <li><p>be sure foreign keys have indexes</p></li>
  <li><p>be sure the where conditions are indexed</p></li>
  <li><p>use of <code>WITH ROWLOCK</code></p></li>
  <li><p>destroy unused indexes, delete, rebuild the indexes</p></li>
  </ul>
  
  <p>now, your turn.</p>