I have a pretty simple query in SQL 2008 R2 and I have a nonclustered index on the "sDate" datetime column.
When I look at the execution plan for the following query it seeks the nonclustered index.
SELECT TOP 1 *
FROM Subs
where sDate = '2012-04-12'
However when i look at the execution plan for this query it does not seek the nonclustered index.
SELECT TOP 1 *
FROM Subs
where sDate > '2012-04-12'
If I force it to use the index the query works and is quick, but if I do not force it, it takes forever. Why isn't SQL using the index on its own?