title: Sql Server - Index not being used
body: <p>After running the following query:</p>
  
  <pre><code>SELECT [hour], count(*) as hits, avg(elapsed)
  FROM myTable
  WHERE [url] IS NOT NULL and floordate &gt;= '2017-05-01'
  group by [hour]
  </code></pre>
  
  <p>the execution plan is basically a clustered Index Scan on the PK (int, auto-increment, 97% of the work)</p>
  
  <p>The thing is: <code>URL</code> has a index on it (regular index because i'm always searching for a exact match), <code>floordate</code> also has an index...</p>
  
  <p>Why are they not being used? How can i speed up this query?</p>
  
  <p>PS: table is 70M items long and this query takes about 9 min to run</p>
  
  <p><strong>Edit 1</strong><br>
  If i don't use (select or filter) a column on my index, will it still be used? Usually i also filter-for/group-by <code>clientId</code> (approx 300 unique across the db) and <code>hour</code> (24 unique)...</p>