Subject | Re: [firebird-support] Index not used by "where xxx not null" query? |
---|---|
Author | Helen Borrie |
Post date | 2006-02-27T13:45:02Z |
At 12:24 AM 28/02/2006, you wrote:
NULL selection. It doesn't care what the value is for this test -
it's only interested in whether there IS a value. (Remember, NULL
and NOT NULL are not values).
So it would be slower for it to fetch the index than to walk the set
and form the stream directly.
./heLen
>Kjell Rilbe wrote:Regardless of the selectivity, the index is no use for a NULL/NOT
>
> > My index selectivity is currently 0.125 (freshly calculated). Could that
> > be the "problem"?
>
>I'm now down to selectivity 0.066667 (freshly calculated). Same result.
>
>But on the other hand, I've got 361 nulls among a total of 581 records.
>Does Firbird detect this and decide that indices are of no use?
NULL selection. It doesn't care what the value is for this test -
it's only interested in whether there IS a value. (Remember, NULL
and NOT NULL are not values).
So it would be slower for it to fetch the index than to walk the set
and form the stream directly.
./heLen