title: Sql Server, find all rows that have been updated by a statement
body: <p>Is there a way of finding all the rows that have been updated by a single statement, sql itself must be tracking this as it could roll back the update if required. I'm interested in finding all the changed rows as I'm getting performance hit using update triggers.</p>
  
  <p>I have a some large (2M-10M) row tables in Sql Server, and I'm adding audit triggers to track when records are updated and by what, trouble is this is killing performance. Most of the updates against the table will touch 20,000+ rows and they're now taking 5-10 times longer than previously.</p>
  
  <p>I've thought of some options</p>
  
  <p>1) Ditch triggers entirely and add the audit fields to every update statement, but that relies on everyone's code being changed.
  2) Use before/after checksum values on the fields and then use them to update the changed rows a second time, still a performance hit.</p>
  
  <p>Has anyone else solved this problem?</p>