Subject RE: [firebird-support] Table Scans and !=
Author Helen Borrie
At 05:20 PM 4/08/2003 -0700, you wrote:
>Well, in a black box world, I can't really do "< 2", but I can
>substitute "!=" with an "IN" of everything but the value I was going to
>compare "!=" to.

True, but judging by the column name (only) I assumed triState was a
tri-state variable.

>Why shouldn't I have triState indexed? In IBExpert the query seems to be
>using the index if I use "IN (0,2)" but not if I use "!=1".

If your triState column is in fact a tri-state variable, then the
selectivity is impossibly low. This is a real killer if there's a chance
that the optimizer would use that index.

Where have you been? If I had 1 dollar for every time I (never mind anyone
else) have explained this, I wouldn't need to work again for the rest of my