Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: OR Vs UNION
My view is...
You can either have
Select ..blah..blah..blah...where col =
'A'
OR col='B'
OR col='c'
also, you can wrtie..
Select...blah..blah..blah....where
col='A'
union
select...blah..blah..blah...where
col='B'
union
select...blah..blah.blah..where
col='C'
Or better.
Select ...blah..blah..blah....where col in
('A','B','C') ; (with proper index in 'col')
Its really upto you.
-Arun.
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Sent: Tuesday, June 24, 2003 11:25
AM
Subject: RE: OR Vs UNION
<FONT face="Courier New" color=#0000ff
size=2>IMHO ...
<FONT face="Courier New" color=#0000ff
size=2>
<FONT face="Courier New" color=#0000ff
size=2>Cannot be.. the Access Path Taken is Different.. "OR" is Transfered to
Inlist Iterator usually ...
<FONT face="Courier New" color=#0000ff
size=2>
Best Regards,Ganesh RDID : +65-6215-8413HP
: +65-9067-8474===========================================Live tolearn... forget... and learn
again.===========================================
<FONT
face=Tahoma size=2>-----Original Message-----From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Jamadagni, RajendraSent: Tuesday, June 24, 2003 11:10
PMTo: Multiple recipients of list ORACLE-LSubject: RE:
OR Vs UNION
I believe OR is internally transformed to UNION (or UNION
ALL) ??
The answer you are looking is ... test and measure it in
_your_ _environment_.
Raj <FONT
size=2>--------------------------------------------------------------------------------Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. QOTD: Any clod can have facts, having an opinion is an art !
>w.r.t performance? > >Thanks >Sami > >Query1) <FONT