[help] subquery vs outer join -
04-24-2008
, 11:25 AM
Table name: table_a, table_b
size of both tables: ~500M
case 1)
select a.feld1, b.field1 from table_a a, table_b b where a.field1 =
b.field1 (+)
case 2)
select a.field1,
(select field1 from table_b where field1 = a.field1) col
from
table_a a
Two cases will return same results but the response time of case 2 is much
faster than case 1 as I really don't understand why? Also what does Oracle
actually do on both case?
pls help, thanks. |