Subject Re: [firebird-support] Re: indexing NULL and NOT NULL values
Author Ivan Prenosil
> Thank you for your replies.
> The selectivity within the not null part was good, unique constraint so
> no duplicates. I did change the null values to some negative impossible
> so that the index will work but I have to drop the unique constraint and
> to impose unique by trigger.

> I was (wrongly) assuming that the null values will be also indexed (to
> either start or end of the index).

Null values ARE indexed, it is the "NOT" clause in "where my_field is NOT null"
that cause you problems.
If negative values are impossible for this column, try

WHERE my_field >= 0

Ivan
http://www.volny.cz/iprenosil/interbase/