[help] subquery vs outer join

This is a discussion on [help] subquery vs outer join within the Oracle forums in Oracle Database category; 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....

Go Back   Database Forum > Oracle Database > Oracle

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 04-24-2008, 01:25 PM
Default [help] subquery vs outer join

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.


Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 07:36 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.