title: Datediff performance
body: <p>I have a number of days variable which I want to compare against a datetime column (senddate).</p>
  <p>I'm currently doing this:</p>
  <pre><code>DECLARE @RunDate datetime = '2013-01-01' 
  DECLARE @CalculationInterval int = 10
  
  DELETE
  FROM TableA
  WHERE datediff(dd, senddate, @RunDate) &gt; @CalculationInterval 
  </code></pre>
  <p>Anything that is older than 10 days should get deleted. We have Index on sendDate column but still the speed is much slower. I know the left side should not have calculation for performance reasons, but what is the optimal way of otherwise solving this issue?</p>