Subject Re: Firebird 2.1.x Indexing
Author scottpks
--- In firebird-support@yahoogroups.com, "Anderson Farias"
> Are you sure? Didn't she said that NOT IN do not use indexes? IN do
> use indexes (at least in FB v1.5). Note that IN (a, b, ..) is
> equivalent to 'a OR b OR ...'.

I did have to go and have a look in the book.

Page 397, in the Expressions and Predicaes section, under Other
Comparison Predicators, in the CAUTION warning block:

... However, IN() does not use an index. ...

I'm assuming that is an old piece of information now, as it was from a
2004 version of the printed book, which was why I thought I would ask
in here to update it. :)


> Althougt IN does use indexes -- once for each value in the list --
> , in some circunstances it's good idea to apply some other better
> condition together, if possible.

Thank you Anderson. Always good to know.


Kind regards,


Scott :)