|
create table t as
select rownum as id1,a.* from dba_objects a ,dba_objects b where rownum<10000;
create index ind_id1 on T (id1);
analyze table COMMON.T compute statistics;
create table t2 as
select rownum as id2,a.* from dba_objects a ,dba_objects b where rownum<10000;
create index ind_id2 on T2 (id2);
analyze table COMMON.T2 compute statistics;
select *
from t
where t.id1 in (select max(1)
from t2 t1, t2 t2,t2 t3
where rownum < 1
and t.owner = t1.owner)
and t.id1 in (select max(1)
from t t1, t t2,t t3
where rownum < 40000000
and t.owner = t1.owner)
select *
from t
where t.id1 in (select max(1)
from t t1, t t2, t t3
where rownum < 40000000
and t.owner = t1.owner)
and t.id1 in (select max(1)
from t2 t1, t2 t2, t2 t3
where rownum < 1
and t.owner = t1.owner) |
|