Subject | Re: FB 2.0 / FB1.5 optimizer difference |
---|---|
Author | lacakus |
Post date | 2006-12-04T07:20:37Z |
Dmitry,
So query of type :
select * from t where c NOT IN (select c from t2)
will NOT use indexes
(because this is select * from t where c<>all(select c from t2)
and :
select * from t where c IN (select c from t2)
this will use index or not ?
(because this is select * from t where c = any(select c from t2)
-Laco.
> Sorry, this is my fault. It's on page 102,102 or 112?
> but only the ALL predicate is mentioned there. The fact that NOT INYes, it will be nice, if this will be exactly documented
>is equal to <> ALL is implied, but it's not very obvious for
>everybody.
> v2.0 de-optimizes both ALL and NOT IN subqueries in order toIn the future NOT IN will use indexes, or it will never use indexes ?
>guarantee a consistent result.
So query of type :
select * from t where c NOT IN (select c from t2)
will NOT use indexes
(because this is select * from t where c<>all(select c from t2)
and :
select * from t where c IN (select c from t2)
this will use index or not ?
(because this is select * from t where c = any(select c from t2)
-Laco.