
|
If you were logged in you would be able to see more operations.
|
|
|
| Planning Status: |
Unspecified
|
|
Test case:
create table t1 (col1 int);
create index i1 on t1 (col1);
commit;
insert into t1 (col1) values (1);
commit;
create table t2 (col2 int);
commit;
select case when exists (select 1 from t1 where col1 = col2) then 1 else 0 end from t2;
-- PLAN (T1 INDEX (I1))
-- PLAN (T2 NATURAL)
-- Everything is okay, T1 is accessed via an index
insert into t2 (col2) values (1) returning case when exists (select 1 from t1 where col1 = col2) then 1 else 0 end;
-- PLAN (T1 NATURAL)
-- Full scan is chosen, this is a bug
|
|
Description
|
Test case:
create table t1 (col1 int);
create index i1 on t1 (col1);
commit;
insert into t1 (col1) values (1);
commit;
create table t2 (col2 int);
commit;
select case when exists (select 1 from t1 where col1 = col2) then 1 else 0 end from t2;
-- PLAN (T1 INDEX (I1))
-- PLAN (T2 NATURAL)
-- Everything is okay, T1 is accessed via an index
insert into t2 (col2) values (1) returning case when exists (select 1 from t1 where col1 = col2) then 1 else 0 end;
-- PLAN (T1 NATURAL)
-- Full scan is chosen, this is a bug
|
Show » |
| There are no comments yet on this issue.
|
|