title: How to Bulk Update with SQL Server?
body: <p>I have a table with 10 millions rows that I need to join with another table and update all data. This is taking more than 1 one hour and it is increasing my transaction log in 10+ GBs. Is there another way to enhance this performance?</p>
  
  <p>I believe that after each update, the indexes and constraints are checked and all information are logged. Is there a way to tell SQL Server to check constraints only after the update is finished and to minimally log the update action?</p>
  
  <p>My query follows below. I've modified some names so it becomes easier to read.</p>
  
  <pre><code>UPDATE o
  SET o.Info1 = u.Info1, o.Info2 = u.Info2, o.Info3 = u.Info3
  FROM Orders o
  INNER JOIN Users u
  ON u.ID = o.User_ID
  </code></pre>
  
  <p><strong>EDIT:</strong> as asked in comments, the table definition would be something like the following (simplifying again to create a generic question).</p>
  
  <h2>Table Orders</h2>
  
  <pre><code>ID int PK
  OrderNumber nvarchar(20)
  User_ID int FK to table Users
  Info1 int FK to table T1
  Info2 int FK to table T2
  Info2 int FK to table T3
  </code></pre>
  
  <h2>Table Users</h2>
  
  <pre><code>ID int PK
  UserName nvarchar(20)
  Info1 int FK to table T1
  Info2 int FK to table T2
  Info2 int FK to table T3
  </code></pre>