title: How do I build effecient SQL filters?
body: <p>After taking an advanced T-SQL performance/query tuning class, something that I thought I remembered hearing was that you can speed up some queries just a little bit if you put your date(time) filters first.</p>
  
  <p>Ex:</p>
  
  <pre><code>WHERE
      RunDate = '12/1/2015' AND
      OtherFilters = etc...
  </code></pre>
  
  <p>But does this really only count if I have indexes in place on these columns I filter on for this table?</p>
  
  <p>So to add to this just a little, should I be building my filters off of the indexes on any tables referenced in the query? Such that my first filters of the query are based on my indexes?</p>
  
  <p>Ex:</p>
  
  <pre><code>WHERE
      ID &gt; 1000 AND
      RunDate &lt;= '1/1/206' AND
      OtherFilters = etc...
  </code></pre>
  
  <p>Where <code>ID</code> and <code>RunDate</code> are part of my indexes/primary key.</p>