title: Cause of a process being a deadlock victim
body: <p>I have a process with a Select which takes a long time to finish, on the order of 5 to 10 minutes. <br/>I am currently <strong>not using</strong> <code>NOLOCK</code> as a hint to the MS SQL database engine.<br/>At the same time we have another process doing updates and inserts into the same database and same tables.<br/> The first process has started, recently to end prematurely with a message</p>
  <blockquote>
  <p>SQLEXCEPTION: Transaction was deadlocked on lock resources with another process and has been chosen as the deadlock victim.</p>
  </blockquote>
  <p>This first process is running at other sites in identical conditions but with smaller databases and thus the select statement in question takes a much shorter period of time (on the order of 30 seconds or so).     In these other sites, I don't get the deadlock message in these other sites.    I also did not get this message at the site that is having the problem initially, but, I assume, as the database has grown, I believe I must have crossed some threshold.      Here are my questions:</p>
  <ol>
  <li>Could the time it takes for a transaction to execute make the associated process more likely to be flagged as a deadlock victim.</li>
  <li>If I execute the select with a NOLOCK hint, will this remove the problem?</li>
  <li>I suspect that a datetime field that is checked as part of the WHERE clause in the select statement is causing the slow lookup time.    Can I create an index based on this field?    Is it advisable?</li>
  </ol>