优化前:
select
。。。。
from tab1 a,tab2 b
where a.id=b.id
and rownum=1;
优化后调整为:
select
。。。。
from tab1 a
where exists
(select 0 from tab2 b where a.id=b.id)
and rownum=1;
优化前:
select
。。。。
from tab1 a,tab2 b
where a.id=b.id
and rownum=1;
优化后调整为:
select
。。。。
from tab1 a
where exists
(select 0 from tab2 b where a.id=b.id)
and rownum=1;