Subject Indices and low selectivity
Author Christian Gütter
Hi,

I have got a small table with about 5.000 records (large
rows) and approx. three inserts a day. Sometimes records
from this table have to be deleted and my customer wants
that these are not physically deleted, but only marked
as 'deleted'.

Of course this means that the where clause of many queries
have to be modified:
SELECT x FROM Y WHERE IsDeleted = 'N'.

I am wondering what is more expensive for the engine: to
scan the whole table or work with an index on the IsDeleted
column.

As I said, the table is quite small, but there are lots of
selects on it (users, SPs, report generators).

I am sure some of you have already made some experiences with
such a scenario and I would be glad if you could share them
with me ;-)


TIA,

Christian