Subject | Re: perf WHERE IN (SUBQUERY) |
---|---|
Author | Adam |
Post date | 2006-09-10T00:21:38Z |
--- In firebird-support@yahoogroups.com, "legrand_legrand_63"
<grand.brun.63@...> wrote:
would probably get that.
select a.*
from a
join b on (a.id = b.aid)
where b.l = 'a'
Adam
<grand.brun.63@...> wrote:
>If you had an index on b.l and you changed it to an inner join, you
> Here is a simple test case:
>
> select * from a
> where a.id in (select b.id from b where l ='a') ;
>
> gives:
> PLAN (B INDEX (B_ID)) PLAN (A NATURAL)
>
> Would it be possible to access A with index A_ID ?
> like in:
>
> select * from a
> where a.id in (1,2)
>
> PLAN (A INDEX (A_ID, A_ID))
>
> Regards
> PAscal
would probably get that.
select a.*
from a
join b on (a.id = b.aid)
where b.l = 'a'
Adam