Subject | perf WHERE IN (SUBQUERY) |
---|---|
Author | legrand_legrand_63 |
Post date | 2006-09-09T20:35:06Z |
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
here is the DDL:
create table A (id integer not null , l varchar(10));
create unique index a_id on a (id);
create table B (id integer not null , l varchar(10));
create unique index b_id on b (id);
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
here is the DDL:
create table A (id integer not null , l varchar(10));
create unique index a_id on a (id);
create table B (id integer not null , l varchar(10));
create unique index b_id on b (id);