Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: OR Vs UNION

RE: OR Vs UNION

From: Ganesh Raja <gans_r_at_rediffmail.com>
Date: Tue, 24 Jun 2003 09:11:37 -0700
Message-ID: <F001.005B87F2.20030624082501@fatcity.com>

<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 to learn... 
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 <FONT   size=2>All Views expressed in this email are strictly personal.   QOTD: Any clod can have facts, having an opinion is an art   !
>----- ------- Original Message ------- -----
  >From: [EMAIL PROTECTED] <FONT
  size=2>>To: Multiple recipients of list ORACLE-L <FONT   size=2>><[EMAIL PROTECTED]> >Sent: Mon,   23 Jun 2003 21:34:52 > <FONT
  size=2>> > >
  > >Hi All, <FONT
  size=2>> >Could someone explain to me which one   is best in >the following two queries   >w.r.t performance? >
  >Thanks >Sami <FONT
  size=2>> >Query1) <FONT
  size=2>>======== >select distinct empployee_id   from employees where >department_id=10 or   >department_id=20 >/
  > >Query2) <FONT
  size=2>>======= >select employee_id from   employees where >department_id=10 <FONT
  size=2>>union >select employee_id from employees 
  where >department_id=20 <FONT 
  size=2>>/ > 
Received on Tue Jun 24 2003 - 11:11:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US