Hello,
I have a simple table not related to any other. It has a not PK column that it is a date. I have created a non-clustered index to that column. If I make this query:
select * from table where datecolumn is not null <-- does not use the index and goes really slow.
But if I remove the not, this way: select * from table where datecolum is null <-- uses the index and goes really fast.
There are much more not nulls than nulls.
Am I forgetting something? Could I use filtered index here?
Thanks in advance.