Quick question for the DBA's out there:
Say I have 2 columns on my table, IsDeleted (bit) and DeletedDate (datetime). The table contains approx 10,000,000 rows.
IsDeleted is a computed column that checks to see if DeletedDate is NULL; and it returns 1 if it is not, and 0 if it is.
Querying this table will mainly be done on the IsDeleted column.
Could anybody give me some suggestions on where I should apply my index?
Applying it to the IsDeleted field brings in a crop of problems due to SET QUOTED IDENTIFIER being off, which isn't necessarily a deal breaker, but would cause some additional work.
Would I see any benefit applying it to DeletedDate, even though I'm not querying that field directly? Should I just bite the bullet and add it to IsDeleted? Is the performance difference between the two negligible?
Thanks again; and if you'd like any clarifications; leave me a comment and I'll update my post.