Subject | Re: [firebird-support] Re: indexing NULL and NOT NULL values |
---|---|
Author | Ivan Prenosil |
Post date | 2006-02-15T12:08:09Z |
> Thank you for your replies.Null values ARE indexed, it is the "NOT" clause in "where my_field is NOT null"
> 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).
that cause you problems.
If negative values are impossible for this column, try
WHERE my_field >= 0
Ivan
http://www.volny.cz/iprenosil/interbase/