Subject Re: [firebird-support] Re: FB 2.0 / FB1.5 optimizer difference
Author Dmitry Yemanov
lacakus wrote:
>
> 102 or 112?

102 printed, 112 electronic :-)

> In the future NOT IN will use indexes, or it will never use indexes ?

I think it could be properly optimized in the future, but IMO it
requires a major rework of the ANY/ALL handling in the engine.

> So query of type :
> select * from t where c NOT IN (select c from t2)
> will NOT use indexes

Theoretically, it could be indexed even now, if T2.C is declared as NOT
NULL. We could enable it as a short-term solution.

> and :
> select * from t where c IN (select c from t2)
> this will use index or not ?

It will.


Dmitry