Subject Re: [firebird-support] Index not used by "where xxx not null" query?
Author Kjell Rilbe
Nando Dessena wrote:

> it's the other way around. If nulls are at the beginning then an index
> can be used for "is null". And that's actually the state of affairs
> (your case 2, I mean) I think.

The same index COULD be used for "is not null" - use the index to find
the first non-null record (skip all the nulls - should be easy using the
idnex, or am I wrong?) and then return that record and all that follow
until the end.

Or would that be less efficient than a straight table scan?

Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64