title: Why is GETDATE slowing down select query if I use a variable?
body: <p>I'm doing a select on a table with about 6 millions records selecting <code>GETDATE()</code></p>
  
  <pre><code>select getdate() as date, [...] from MyTable
  </code></pre>
  
  <p>I verified that the performance issue is on <code>GETDATE()</code>, removing all other fields the query is still slow.</p>
  
  <p>I thought that putting the value of <code>GETDATE()</code> in a separate var would speed the query up</p>
  
  <pre><code>declare @now datetime
  set @now = GETDATE()
  select @now as date, [...] from MyTable
  </code></pre>
  
  <p>It is slow as well. Why?</p>