title: SQL Server Update Query does not use Index
body: <p>I have a update query that runs slow (see first query below).  I have an index created on the table PhoneStatus and column PhoneID that is named IX_PhoneStatus_PhoneID.  The Table PhoneStatus contains 20 million records.  When I run the following query, the index is not used and a Clustered Index Scan is used and in-turn the update runs slow.  </p>
  
  <pre><code>UPDATE PhoneStatus    
  SET RecordEndDate = GETDATE()    
  WHERE PhoneID = 126  
  </code></pre>
  
  <p>If I execute the following query, which includes the new FROM, I still have the same problem with the index not used.</p>
  
  <pre><code>UPDATE PhoneStatus    
  SET RecordEndDate = GETDATE()   
  FROM Cust_Profile.PhoneStatus     
  WHERE PhoneID = 126 
  </code></pre>
  
  <p>But if I add the HINT to force the use of the index on the FROM it works correctly, and an Index Seek is used.</p>
  
  <pre><code>UPDATE PhoneStatus     
  SET RecordEndDate = GETDATE()   
  FROM Cust_Profile.PhoneStatus WITH(INDEX(IX_PhoneStatus_PhoneID))   
  WHERE PhoneID = 126    
  </code></pre>
  
  <p>Does anyone know why the first query would not use the Index?</p>
  
  <p><strong>Update</strong></p>
  
  <p>In the table of 20 million records, each phoneID could show up 10 times at the most</p>
  
  <p>BarDev</p>