I have a 5 million row table that gets hit with a specific query the most. So I want add a index to speed things up.
SELECT someID FROM someTable WHERE myVarChar = @myVarChar AND MyBit = 0 AND MyBit2 = 1 AND MyBit3 = 0
myVarChar column is unique.
What would the best index be for this type of query? I currently have a single index that covers all of the 4 columns in the above query. Also, do I have to reindex every so often or its automatic?
I am using sql server 2008 standard.